Skip to main content

3D molecular structure generation for MD simulation

Project description

pygen-structures

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.

This should make it significantly easier to perform combinatorial searches on particular sequence lengths and linkages, requiring no manual intervention provided the molecules of interest are reasonably small and the residue/patch definitions already exist in the forcefield.

In essence, pygen-structures aims (eventually) to be a complete psfgen replacement with more autonomous functions and without the necessity for an initial 3D structure.

pygen-structures depends upon rdkit and numpy and can be installed via pip:

pip install pygen-structures

Tests can be run with pytest, and the only integration test example at present requires openmm:

pytest --pyargs pygen_structures

The package can be used as a command line utility, or as a Python library. Command line usage is simple:

pygen-structures --use-charmm-names AGLC-BFRU-AGAL --patches RAFF 0 1 2 --segid RAFF --name Raffinose -o RAFF

will produce the structure for the sugar raffinose, saving the PDB file to RAFF.pdb and the PSF file to RAFF.psf. For pure protein structures, the one letter code can be used (the histidine residue type can be set using --histidine, but defaults to HSE):

pygen-structures YEET -o YEET

D-amino acids need only be preceded with a lowercase d. In one letter code mode, first and last patches can also be specified using hyphens as delimiters, and the patch name to be applied in the relevant location:

pygen-structures NNEU-AdFK-CTER -o AdFK

When output is not specified, the PDB file is written directly to stdout.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygen-structures-0.2.2.tar.gz (2.3 MB view hashes)

Uploaded Source

Built Distribution

pygen_structures-0.2.2-py3-none-any.whl (2.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page