semvec/pypi-packages huggingface dataset:
chemstruct 2019.6.2
Package for chemical structure analysis of atomic files

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:

```bash
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: 

```bash
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`.