pygen-structures (pigeon structures) is a Python utility which allows for
the generation of 3 dimensional molecular structures which can be used in
molecular dynamics or Monte Carlo simulations. Molecules are generated from a
list of residues and patches in the format of the CHARMM forcefield, and can be
written out as valid PSF and PDB files. The package can be used as a command
line utility, or as a Python library.
pygen-structures can be installed using pip
pip install pygen-structures), but relies upon RDKit, which is
not pip-installable. RDKit can be installed in many ways, but the easiest
way is to use the conda package manager. numpy is an additional
dependency. For full installation instructions, see Installation. Python
3.6 and 3.7 are supported. To run the tests, pytest and OpenMM are
In essence, pygen-structures aims (eventually) to be a complete psfgen replacement with more autonomous functionality. At present, structures for small molecules can be generated. This should make it significantly easier to perform combinatorial searches on particular sequence lengths and linkages. This requires no manual intervention provided the molecules of interest are reasonably small (small enough that embedding coordinates is possible - fewer than 15 residues - and that the secondary structure is not vitally important) and the residue/patch definitions already exist in the forcefield.
The project’s GitHub repository can be found here. New contributors are welcome. Any bugs or significant frustrations can be reported in the issue tracker.
A Quick Example¶
Creation of the sugar raffinose, making
$ pygen-structures -u AGLC-BFRU-AGAL -p RAFF 0 1 2 -n Raffinose -s RAFF -o RAFF $ head RAFF.pdb COMPND Raffinose AUTHOR pygen-structures v0.2.3 REMARK 42 REMARK 42 TOPOLOGY FILES USED REMARK 42 top_all36_carb.rtf ATOM 1 C1 AGLC 1 -1.674 -0.714 -0.235 1.00 0.00 RAFF C ATOM 2 H1 AGLC 1 -1.556 0.136 0.443 1.00 0.00 RAFF H ATOM 3 O1 AGLC 1 -2.855 -0.603 -0.910 1.00 0.00 RAFF O ATOM 4 C5 AGLC 1 0.623 -0.935 -0.607 1.00 0.00 RAFF C ATOM 5 H5 AGLC 1 1.188 -1.649 -1.276 1.00 0.00 RAFF H
- Command Line Usage
- Library Usage
- API Reference