{"id":22731061,"url":"https://github.com/genentech/cdd_chem","last_synced_at":"2025-03-30T01:29:46.941Z","repository":{"id":185772686,"uuid":"577963238","full_name":"Genentech/cdd_chem","owner":"Genentech","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-30T23:06:07.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-02-05T03:27:52.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Genentech.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-13T23:42:03.000Z","updated_at":"2023-06-22T17:01:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9b15c5b-96c8-40f0-82ed-821a2687d3ab","html_url":"https://github.com/Genentech/cdd_chem","commit_stats":null,"previous_names":["genentech/cdd_chem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fcdd_chem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fcdd_chem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fcdd_chem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fcdd_chem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genentech","download_url":"https://codeload.github.com/Genentech/cdd_chem/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246264476,"owners_count":20749471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T19:19:18.216Z","updated_at":"2025-03-30T01:29:46.922Z","avatar_url":"https://github.com/Genentech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDD Chem Library\n\nGeneral purpose helper classes around the [RDKit](https://www.rdkit.org/) and\n[Openeye](https://www.eyesopen.com/) toolkits for handling molecular input files.\nThis packages tries to abstract the toolkits away and thus provides a toolkit\nindependent interface to dealing with molecular files and, to some extend, with\nmolecule objects.\n\nThe underlying toolkit can be set with `cdd_chem.toolkit.set_toolkit`.  If it's not\nset then the underlying toolkit is taken from the `CDDLIB_TOOLKIT` environment\nvariable. If this environment variable is not set then the default toolkit will be\n`oechem` provided that `oechem` can be imported.  Otherwise the toolkit will be set\nto `rdkit`.\n\nThe package is still under development but here is an example on how to get started:\n\n```\n#!/usr/bin/env python3\n\nimport argparse\nimport sys\n\nfrom cdd_chem.io import get_mol_input_stream, get_mol_output_stream\n\n\ndef main() -\u003e int:\n    \"\"\"Console script\"\"\"\n    args = parse_options()\n\n    with get_mol_input_stream(args.input) as in_file, get_mol_output_stream(args.output) as out_file:\n        for mol in in_file:\n            # set SD tag data (that has to be a string)\n            mol['num_atoms'] = str(mol.num_atoms)\n            out_file.write_mol(mol)\n    return 0\n\n\ndef parse_options() -\u003e argparse.Namespace:\n    \"\"\"Parse main options.\"\"\"\n    parser = argparse.ArgumentParser(description=\"Command line arguments:\")\n    parser.add_argument('--input', type=str, metavar='molfile', required=True, help='input molecule file')\n    parser.add_argument('--output', type=str, metavar='molfile', required=True, help='output molecule file')\n    return parser.parse_args()\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n```\n\n## Features\n\nToolkit-agnostic features for:\n\n- Reading and writing molecules to SD files\n- Converting between molecules and SMILES\n- Setting and retrieving properties of molecules\n- Reading and writing pandas dataframes containing representations of molecules with properties\n\n## Credits\n\nThis Python package was created with\n\n- [Cookiecutter](https://github.com/audreyr/cookiecutter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Fcdd_chem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenentech%2Fcdd_chem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Fcdd_chem/lists"}