https://github.com/zincware/rdkit2ase
Create atomistic structures with ASE, rdkit and packmol
https://github.com/zincware/rdkit2ase
ase packmol rdkit
Last synced: 11 months ago
JSON representation
Create atomistic structures with ASE, rdkit and packmol
- Host: GitHub
- URL: https://github.com/zincware/rdkit2ase
- Owner: zincware
- License: apache-2.0
- Created: 2023-08-16T08:46:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-07-21T08:40:49.000Z (11 months ago)
- Last Synced: 2025-07-21T10:12:18.450Z (11 months ago)
- Topics: ase, packmol, rdkit
- Language: Python
- Homepage: https://zincware.github.io/rdkit2ase/
- Size: 1.44 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/zincware)
[](https://codecov.io/gh/zincware/rdkit2ase)
[](https://badge.fury.io/py/rdkit2ase)
[](https://doi.org/10.5281/zenodo.15423477)
[](https://zincware.github.io/rdkit2ase/)
# rdkit2ase - Interface between the rdkit and ASE package.
Installation via `pip install rdkit2ase`.
```py
from rdkit2ase import rdkit2ase, ase2rdkit
atoms: ase.Atoms = rdkit2ase(mol)
mol = ase2rdkit(atoms)
```
```py
from rdkit2ase import smiles2atoms
atoms: ase.Atoms = smiles2atoms("O")
print(atoms)
>>> Atoms(symbols='OH2', pbc=False)
```
## Packmol Interface
If you have [packmol](https://github.com/m3g/packmol) (at least `v20.15.0`) you
can use the rdkit2ase interface.
```py
from rdkit2ase import pack, smiles2conformers
water = smiles2conformers("O", 2)
ethanol = smiles2conformers("CCO", 5)
density = 1000 # kg/m^3
box = pack([water, ethanol], [7, 5], density)
print(box)
>>> Atoms(symbols='C10H44O12', pbc=True, cell=[8.4, 8.4, 8.4])
```
### Limitations
- `rdkit2ase.ase2rdkit` won't be able to detect higher order bonds.