Skip to main content

Package for chemical structure analysis of atomic files

Project description

ChemStruct: Chemical Structure Analysis Package

About

ChemStruct is a Python package for structural analysis of atomic files (like .xyz files) and assistance with molecular dynamics simulations on LAMMPS. ChemStruct computes bonds based on the distance between atoms, as well as angles and dihedrals, hybridization, cycles, etc. It also writes LAMMPS Data Files with atom_style full for a given .xyz file, using CGenFF (CHARMM General Force Field) atomic classification and original parameters.

Ready-to-run examples can be found in the examples directory.

Usage

Install ChemStruct using pip:

pip3 install chemstruct

Then run Python, import the package and use the write_lmpdat() function to convert your xyz file into a LAMMPS Data File:

from chemstruct.quick import write_lmpdat
write_lmpdat("yourdir/yourfile.xyz", "outdir/outfile.lmp")

Note that:

(1) The write_lmpdat() function will take a break while the user is checking the parameters in the .par file (written in the same directory as the input .xyz file, with the same name plus _(computed_parameters).par). This is needed because not all bonds/angles/dihedrals found in the input file will always have parameters, so a few manual additions may be necessary. Another necessity is the choice of atomic charges, since CHARMM doesn't have a one-for-one class-charge correspondence. ChemStruct makes suggestions for charges. If your system if simple enough, no manual editing will be necessary.

(2) The write_lmpdat() function requires a defined Lattice in the input .xyz file, e.g. as generated by Ovito (open-source visualization software). The Lattice is needed when the system is periodic -- if that is not the case, writing Lattice="10.0 0.0 0.0 0.0 10 0.0 0.0 0.0 10.0"in the second line of your .xyz file will make it work.

Contact

Send any bugs or suggestions to pdemingos@gmail.com.

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

chemstruct-2019.6.2.tar.gz (161.0 kB view details)

Uploaded Source

Built Distribution

chemstruct-2019.6.2-py3-none-any.whl (180.3 kB view details)

Uploaded Python 3

File details

Details for the file chemstruct-2019.6.2.tar.gz.

File metadata

  • Download URL: chemstruct-2019.6.2.tar.gz
  • Upload date:
  • Size: 161.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for chemstruct-2019.6.2.tar.gz
Algorithm Hash digest
SHA256 b45a821734897ad1ec3621d39573b2a5f72dcae2d540b86109192d18c8012201
MD5 bf12366452a75ddb96e362b69f53b717
BLAKE2b-256 edd697d0ed646ef6af9a65ab76b935c53ab75a8205872325af04a5204fa204fd

See more details on using hashes here.

File details

Details for the file chemstruct-2019.6.2-py3-none-any.whl.

File metadata

  • Download URL: chemstruct-2019.6.2-py3-none-any.whl
  • Upload date:
  • Size: 180.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for chemstruct-2019.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c99c57c6f0b2ec265883ef74f9e750f8adbacc2da0a9c2098310f7b8e97288
MD5 4a5f41311305d59999ee15be1c4803d3
BLAKE2b-256 d917b0bc0b50021c7fa000dcc25a7e7639d3746d17d16782fd21fa413ceb7aa6

See more details on using hashes here.

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