Skip to content

Commit 3ad7690

Browse files
authored
Add files via upload
1 parent e370ac3 commit 3ad7690

File tree

4 files changed

+114
-0
lines changed

4 files changed

+114
-0
lines changed

docs/_config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
remote_theme: pages-themes/cayman@v0.2.0
2+
plugins:
3+
- jekyll-remote-theme
4+
title: "mol2chemfigPy3"
5+
description: "A Python 3 version of mol2chemfig package"
6+
show_downloads: true

docs/image/callgraph.svg

422 KB
Loading

docs/index.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# mol2chemfigPy3
2+
3+
[![PyPI](https://img.shields.io/pypi/v/mol2chemfigPy3?color=ff69b4)](https://pypi.org/project/mol2chemfigPy3/)
4+
[![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)
5+
![OS](https://img.shields.io/badge/OS-Win%20|%20Linux%20|%20macOS-blue?color=00B16A)
6+
![python](https://img.shields.io/badge/Python->3.8%20-blue.svg?color=dd9b65)
7+
![black](https://img.shields.io/badge/code%20style-black-black)
8+
![pytest](https://github.com/Augus1999/mol2chemfigPy3/actions/workflows/pytest.yml/badge.svg)
9+
10+
This is NOT an official version of mol2chemfig for python 3.
11+
12+
mol2chemfigPy3 is a translation from py2 to py3 based on
13+
old [mol2chemfig](http://chimpsky.uwaterloo.ca/mol2chemfig/download) version 1.5.
14+
15+
## Install
16+
17+
### install from PyPi
18+
19+
```bash
20+
$ pip install -U mol2chemfigPy3
21+
```
22+
23+
## Usage
24+
25+
### Use in command line
26+
27+
> `mol2chemfig` and `python -m mol2chemfigPy3` are equivalent.
28+
29+
#### 1. getting version
30+
31+
```bash
32+
$ mol2chemfig --version
33+
```
34+
35+
#### 2. getting help
36+
37+
```bash
38+
$ mol2chemfig -h
39+
```
40+
41+
#### 3. some examples
42+
43+
##### 3.1 converting SMILES
44+
45+
```bash
46+
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O"
47+
```
48+
49+
it will give you
50+
51+
```latex
52+
\chemfig{OH-[:180,,1]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])}
53+
```
54+
55+
##### 3.2 writing to an output file
56+
57+
```bash
58+
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O" > phenol-smi-terse.tex
59+
```
60+
61+
it will write result to file `phenol-smi-terse.tex`
62+
63+
##### 3.3 searching PubChem database
64+
65+
```bash
66+
$ mol2chemfig -zw -i pubchem 996
67+
```
68+
69+
##### 3.4 reading from a file
70+
71+
```bash
72+
$ mol2chemfig -zw peniciling.mol
73+
```
74+
75+
### Use as a python package (new add in to this python 3 version)
76+
77+
This is not included in the original Py2 version of mol2chemfig.
78+
79+
> 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_)
80+
81+
e. g.
82+
83+
```python
84+
from mol2chemfigPy3 import mol2chemfig
85+
86+
mol2chemfig('996') # search the PubChem database
87+
88+
mol2chemfig('C1=CC=C(C=C1)O') # transfer InChI/SMILES to chemfig
89+
90+
mol2chemfig('./methanol.smi') # from a file
91+
```
92+
93+
## To future maintainers
94+
95+
The static callgraph of this project is:
96+
97+
[![callgraph](image/callgraph.svg)](image/callgraph.svg)
98+
99+
## Document
100+
101+
~~See official document [mol2chemfig-doc.pdf (uwaterloo.ca)](http://chimpsky.uwaterloo.ca/m2cf_static/mol2chemfig-doc.pdf)~~
102+
103+
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).
104+
105+
## License
106+
107+
MIT license
108+

docs/mol2chemfig-doc.pdf

224 KB
Binary file not shown.

0 commit comments

Comments
 (0)