# mol2chemfigPy3
[![PyPI](https://img.shields.io/pypi/v/mol2chemfigPy3?color=ff69b4)](https://pypi.org/project/mol2chemfigPy3/)
[![Downloads](https://static.pepy.tech/personalized-badge/mol2chemfigpy3?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads)](https://pepy.tech/project/mol2chemfigpy3)
![OS](https://img.shields.io/badge/OS-Win%20|%20Linux%20|%20macOS-blue?color=00B16A)
![python](https://img.shields.io/badge/Python->3.8%20-blue.svg?color=dd9b65)
![black](https://img.shields.io/badge/code%20style-black-black)
![pytest](https://github.com/Augus1999/mol2chemfigPy3/actions/workflows/pytest.yml/badge.svg)
This is NOT an official version of mol2chemfig for python 3.
mol2chemfigPy3 is a translation from py2 to py3 based on
old [mol2chemfig](http://chimpsky.uwaterloo.ca/mol2chemfig/download) version 1.5.
## Install
### install from PyPi
```bash
$ pip install -U mol2chemfigPy3
```
## Usage
### Use in command line
> `mol2chemfig` and `python -m mol2chemfigPy3` are equivalent.
#### 1. getting version
```bash
$ mol2chemfig --version
```
#### 2. getting help
```bash
$ mol2chemfig -h
```
#### 3. some examples
##### 3.1 converting SMILES
```bash
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O"
```
it will give you
```latex
\chemfig{OH-[:180,,1]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])}
```
##### 3.2 writing to an output file
```bash
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O" > phenol-smi-terse.tex
```
it will write result to file `phenol-smi-terse.tex`
##### 3.3 searching PubChem database
```bash
$ mol2chemfig -zw -i pubchem 996
```
##### 3.4 reading from a file
```bash
$ mol2chemfig -zw peniciling.mol
```
### Use as a python package (new add in to this python 3 version)
This is not included in the original Py2 version of mol2chemfig.
> mol2chemfigPy3.___mol2chemfig___(content: _str_, *args: _str_, rotate: _float = 0.0_, aromatic: _bool = True_, marker: _Optional[str] = None_, name: _Optional[str] = None_, relative_angle: _bool = False_, show_carbon: _bool = False_, show_methyl: _bool = False_, inline: _bool = False_)
e. g.
```python
from mol2chemfigPy3 import mol2chemfig
mol2chemfig('996') # search the PubChem database
mol2chemfig('C1=CC=C(C=C1)O') # transfer InChI/SMILES to chemfig
mol2chemfig('./methanol.smi') # from a file
```
## Document
~~See official document [mol2chemfig-doc.pdf (uwaterloo.ca)](http://chimpsky.uwaterloo.ca/m2cf_static/mol2chemfig-doc.pdf)~~
The website seems down, so here is a mirror [mol2chemfig Documentation Version 1.5](https://mirror.ox.ac.uk/sites/ctan.org/graphics/mol2chemfig/mol2chemfig-doc.pdf)
## License
MIT license
Raw data
{
"_id": null,
"home_page": "https://augus1999.github.io/mol2chemfigPy3/",
"name": "mol2chemfigPy3",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "Chemistry, chemfig",
"author": "Nianze A. Tao",
"author_email": "tao-nianze@hiroshima-u.ac.jp",
"download_url": "https://files.pythonhosted.org/packages/d7/c7/1cc8439919426f1afcfb7ea7f6cb9fdc0749c691d48c863bca759edbe87b/mol2chemfigpy3-1.5.11.tar.gz",
"platform": null,
"description": "# mol2chemfigPy3\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/mol2chemfigPy3?color=ff69b4)](https://pypi.org/project/mol2chemfigPy3/)\r\n[![Downloads](https://static.pepy.tech/personalized-badge/mol2chemfigpy3?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads)](https://pepy.tech/project/mol2chemfigpy3)\r\n![OS](https://img.shields.io/badge/OS-Win%20|%20Linux%20|%20macOS-blue?color=00B16A)\r\n![python](https://img.shields.io/badge/Python->3.8%20-blue.svg?color=dd9b65)\r\n![black](https://img.shields.io/badge/code%20style-black-black)\r\n![pytest](https://github.com/Augus1999/mol2chemfigPy3/actions/workflows/pytest.yml/badge.svg)\r\n\r\nThis is NOT an official version of mol2chemfig for python 3.\r\n\r\nmol2chemfigPy3 is a translation from py2 to py3 based on\r\nold [mol2chemfig](http://chimpsky.uwaterloo.ca/mol2chemfig/download) version 1.5.\r\n\r\n## Install\r\n\r\n### install from PyPi\r\n\r\n```bash\r\n$ pip install -U mol2chemfigPy3\r\n```\r\n\r\n## Usage\r\n\r\n### Use in command line\r\n\r\n> `mol2chemfig` and `python -m mol2chemfigPy3` are equivalent.\r\n\r\n#### 1. getting version\r\n\r\n```bash\r\n$ mol2chemfig --version\r\n```\r\n\r\n#### 2. getting help\r\n\r\n```bash\r\n$ mol2chemfig -h\r\n```\r\n\r\n#### 3. some examples\r\n\r\n##### 3.1 converting SMILES\r\n\r\n```bash\r\n$ mol2chemfig -zw -i direct \"C1=CC=C(C=C1)O\"\r\n```\r\n\r\nit will give you\r\n\r\n```latex\r\n\\chemfig{OH-[:180,,1]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])}\r\n```\r\n\r\n##### 3.2 writing to an output file\r\n\r\n```bash\r\n$ mol2chemfig -zw -i direct \"C1=CC=C(C=C1)O\" > phenol-smi-terse.tex\r\n```\r\n\r\nit will write result to file `phenol-smi-terse.tex`\r\n\r\n##### 3.3 searching PubChem database\r\n\r\n```bash\r\n$ mol2chemfig -zw -i pubchem 996\r\n```\r\n\r\n##### 3.4 reading from a file\r\n\r\n```bash\r\n$ mol2chemfig -zw peniciling.mol\r\n```\r\n\r\n### Use as a python package (new add in to this python 3 version)\r\n\r\nThis is not included in the original Py2 version of mol2chemfig.\r\n\r\n> mol2chemfigPy3.___mol2chemfig___(content: _str_, *args: _str_, rotate: _float = 0.0_, aromatic: _bool = True_, marker: _Optional[str] = None_, name: _Optional[str] = None_, relative_angle: _bool = False_, show_carbon: _bool = False_, show_methyl: _bool = False_, inline: _bool = False_)\r\n\r\ne. g.\r\n\r\n```python\r\nfrom mol2chemfigPy3 import mol2chemfig\r\n\r\nmol2chemfig('996') # search the PubChem database\r\n\r\nmol2chemfig('C1=CC=C(C=C1)O') # transfer InChI/SMILES to chemfig\r\n\r\nmol2chemfig('./methanol.smi') # from a file\r\n```\r\n\r\n## Document\r\n\r\n~~See official document [mol2chemfig-doc.pdf (uwaterloo.ca)](http://chimpsky.uwaterloo.ca/m2cf_static/mol2chemfig-doc.pdf)~~\r\n\r\nThe website seems down, so here is a mirror [mol2chemfig Documentation Version 1.5](https://mirror.ox.ac.uk/sites/ctan.org/graphics/mol2chemfig/mol2chemfig-doc.pdf)\r\n\r\n## License\r\n\r\nMIT license\r\n\r\n",
"bugtrack_url": null,
"license": "MIT licence",
"summary": "python3 version of mol2chemfig",
"version": "1.5.11",
"project_urls": {
"Homepage": "https://augus1999.github.io/mol2chemfigPy3/",
"Source": "https://github.com/Augus1999/mol2chemfigPy3"
},
"split_keywords": [
"chemistry",
" chemfig"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3ea0d28e898d5a0587ef3ff8b0fc8cea95e1fa2ab585bdbc31d3702c119dc103",
"md5": "a8351cab3b5505c8fd76833adf4def3d",
"sha256": "d1b42a333917e9b0e5a2aa6cccc3fd99b9357704a6490f6ed82341f30f85544e"
},
"downloads": -1,
"filename": "mol2chemfigPy3-1.5.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a8351cab3b5505c8fd76833adf4def3d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 34687,
"upload_time": "2024-12-09T02:25:33",
"upload_time_iso_8601": "2024-12-09T02:25:33.098152Z",
"url": "https://files.pythonhosted.org/packages/3e/a0/d28e898d5a0587ef3ff8b0fc8cea95e1fa2ab585bdbc31d3702c119dc103/mol2chemfigPy3-1.5.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d7c71cc8439919426f1afcfb7ea7f6cb9fdc0749c691d48c863bca759edbe87b",
"md5": "1043fd6b2af73f4a7368fbe51a0f07a9",
"sha256": "ae54927916f4e888bcab2385e3895992bbff46a99a83b26847ff952d0fadd538"
},
"downloads": -1,
"filename": "mol2chemfigpy3-1.5.11.tar.gz",
"has_sig": false,
"md5_digest": "1043fd6b2af73f4a7368fbe51a0f07a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 33142,
"upload_time": "2024-12-09T02:25:35",
"upload_time_iso_8601": "2024-12-09T02:25:35.174553Z",
"url": "https://files.pythonhosted.org/packages/d7/c7/1cc8439919426f1afcfb7ea7f6cb9fdc0749c691d48c863bca759edbe87b/mol2chemfigpy3-1.5.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 02:25:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Augus1999",
"github_project": "mol2chemfigPy3",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "epam.indigo",
"specs": []
}
],
"lcname": "mol2chemfigpy3"
}