# chiralfinder
Data and codes for the paper "ChiralFinder: an Open-Source Tool for Precise Stereogenic Element Detection and Stereoisomer Discrimination", in submission.
## Quick use
Install Anaconda, create and enter your own environment like
conda create -n env_test python=3.10
Enter the conda environment and install the ChiralFinder package through pip like
```
conda activate env_test
pip install chiralfinder
```
Run `test.py` to get example results.
```
python test.py
```
```python
from chiralfinder import ChiralFinder
if __name__ == '__main__':
smi_list = ["C[C@H]1CC(=O)[C@]2(CCCC2=O)C1", "CC1=CC=C(SC2=C(C)N(C3=CC=CC=C3C(C)(C)C)C(C)=C2)C=C1"]
chiral_finder = ChiralFinder(smi_list, "SMILES")
res_ = chiral_finder.get_axial(n_cpus=8)
print(res_[0]["chiral axes"], res_[1]["chiral axes"])
chiral_finder.draw_res_axial("./img")
smi_list_center = ["BrC/C(=C\[C@@H]1CCCO1)C1CCCCC1"]
chiral_finder = ChiralFinder(smi_list_center, "SMILES")
res_ = chiral_finder.get_central()
print(res_)
```
You will get the images of two molecules with predicted chiral axes in the folder `./img` by default. Predicted chiral axes:
```
[(5,)] [(9, 10)]
```
<img src="https://github.com/Meteor-han/chiralfinder/blob/main/img_axial/0.png" alt="0" width="30%" height="auto" /><img src="https://github.com/Meteor-han/chiralfinder/blob/main/img_axial/1.png" alt="1" width="30%" height="auto" />
You will get the prediction of one molecule for central chirality.
```
[{
'center id': [4],
'quadrupole matrix':
[[array([[-0.29989323, -1.08474687, 0.09943544],
[-2.0754821 , 0.47857598, 1.02051223],
[-0.0064714 , -0.03258116, 2.29906673]])]],
'determinant': [[-5.501797575969392]],
'sign': [[-1.0]]
}]
```
## The RotA dataset
The RotA dataset in excel with labeled chiral axes and some calculated molecular properties is stored in the folder `./data`.
## Citation
```
To be filled
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Meteor-han/chiralfinder/",
"name": "chiralfinder",
"maintainer": "Runhan Shi",
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": "han.run.jiangming@sjtu.edu.cn",
"keywords": "Chirality, Chiral axis",
"author": "Runhan Shi",
"author_email": "han.run.jiangming@sjtu.edu.cn",
"download_url": "https://files.pythonhosted.org/packages/43/bb/4496f82001b9f994d3533db66bad9bab03b31ee690a6c66af95a9aaf9d92/chiralfinder-0.1.4.tar.gz",
"platform": null,
"description": "# chiralfinder\n\nData and codes for the paper \"ChiralFinder: an Open-Source Tool for Precise Stereogenic Element Detection and Stereoisomer Discrimination\", in submission.\n\n## Quick use\n\nInstall Anaconda, create and enter your own environment like\n\n conda create -n env_test python=3.10\nEnter the conda environment and install the ChiralFinder package through pip like\n\n```\nconda activate env_test\npip install chiralfinder\n```\n\nRun `test.py` to get example results.\n\n```\npython test.py\n```\n\n```python\nfrom chiralfinder import ChiralFinder\n\nif __name__ == '__main__':\n smi_list = [\"C[C@H]1CC(=O)[C@]2(CCCC2=O)C1\", \"CC1=CC=C(SC2=C(C)N(C3=CC=CC=C3C(C)(C)C)C(C)=C2)C=C1\"]\n\n chiral_finder = ChiralFinder(smi_list, \"SMILES\")\n res_ = chiral_finder.get_axial(n_cpus=8)\n print(res_[0][\"chiral axes\"], res_[1][\"chiral axes\"])\n chiral_finder.draw_res_axial(\"./img\")\n\n smi_list_center = [\"BrC/C(=C\\[C@@H]1CCCO1)C1CCCCC1\"]\n chiral_finder = ChiralFinder(smi_list_center, \"SMILES\")\n res_ = chiral_finder.get_central()\n print(res_)\n```\n\nYou will get the images of two molecules with predicted chiral axes in the folder `./img` by default. Predicted chiral axes:\n\n```\n[(5,)] [(9, 10)]\n```\n\n<img src=\"https://github.com/Meteor-han/chiralfinder/blob/main/img_axial/0.png\" alt=\"0\" width=\"30%\" height=\"auto\" /><img src=\"https://github.com/Meteor-han/chiralfinder/blob/main/img_axial/1.png\" alt=\"1\" width=\"30%\" height=\"auto\" />\n\nYou will get the prediction of one molecule for central chirality.\n\n```\n[{\n'center id': [4], \n'quadrupole matrix': \n [[array([[-0.29989323, -1.08474687, 0.09943544],\n [-2.0754821 , 0.47857598, 1.02051223],\n [-0.0064714 , -0.03258116, 2.29906673]])]], \n'determinant': [[-5.501797575969392]], \n'sign': [[-1.0]]\n}]\n```\n\n\n\n\n## The RotA dataset\n\nThe RotA dataset in excel with labeled chiral axes and some calculated molecular properties is stored in the folder `./data`.\n\n## Citation\n\n```\nTo be filled\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The chiralfinder package.",
"version": "0.1.4",
"project_urls": {
"Documentation": "https://github.com/Meteor-han/chiralfinder/",
"Homepage": "https://github.com/Meteor-han/chiralfinder/",
"Repository": "https://github.com/Meteor-han/chiralfinder/",
"issues": "https://github.com/Meteor-han/chiralfinder/issues"
},
"split_keywords": [
"chirality",
" chiral axis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "04a33ddc0d43a10484f8f3d988be77b1fe7fa7b3484a142d94af680f66494928",
"md5": "9e7a85c6ade7540a47ddf85294c8bb16",
"sha256": "e9e337a590cca5df190cc90ea9116fc603ea06e161053fea47b8591e69e59717"
},
"downloads": -1,
"filename": "chiralfinder-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9e7a85c6ade7540a47ddf85294c8bb16",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 17894,
"upload_time": "2024-11-27T13:33:19",
"upload_time_iso_8601": "2024-11-27T13:33:19.710956Z",
"url": "https://files.pythonhosted.org/packages/04/a3/3ddc0d43a10484f8f3d988be77b1fe7fa7b3484a142d94af680f66494928/chiralfinder-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "43bb4496f82001b9f994d3533db66bad9bab03b31ee690a6c66af95a9aaf9d92",
"md5": "4d68aa93b9e6c23db09ebe2fe93a03e5",
"sha256": "805714e82dec8548520f0a9acef442927f7542a1f4fdbfbe557037710d40e734"
},
"downloads": -1,
"filename": "chiralfinder-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "4d68aa93b9e6c23db09ebe2fe93a03e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 26927,
"upload_time": "2024-11-27T13:33:21",
"upload_time_iso_8601": "2024-11-27T13:33:21.610857Z",
"url": "https://files.pythonhosted.org/packages/43/bb/4496f82001b9f994d3533db66bad9bab03b31ee690a6c66af95a9aaf9d92/chiralfinder-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-27 13:33:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Meteor-han",
"github_project": "chiralfinder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "chiralfinder"
}