Skip to main content

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.

Release files for chemstruct 2019.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemstruct 2019.6.2
File Size Uploaded
chemstruct-2019.6.2.tar.gz 161.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chemstruct 2019.6.2
File Interpreter ABI Platform
chemstruct-2019.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 341.3 kB

Release files / chemstruct-2019.6.2.tar.gz

Download URL chemstruct-2019.6.2.tar.gz
Size 161.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b45a821734897ad1ec3621d39573b2a5f72dcae2d540b86109192d18c8012201
BLAKE2b-256 checksum
How to use checksums
edd697d0ed646ef6af9a65ab76b935c53ab75a8205872325af04a5204fa204fd
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / chemstruct-2019.6.2-py3-none-any.whl

Download URL chemstruct-2019.6.2-py3-none-any.whl
Size 180.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2c99c57c6f0b2ec265883ef74f9e750f8adbacc2da0a9c2098310f7b8e97288
BLAKE2b-256 checksum
How to use checksums
d917b0bc0b50021c7fa000dcc25a7e7639d3746d17d16782fd21fa413ceb7aa6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

2019.6.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page