LigParGen2LAMMPS.jl

Tool to convert LigParGen data file to a LAMMPS molecule file
Author vvpisarev
Popularity
5 Stars
Updated Last
9 Months Ago
Started In
April 2021

LigParGen2LAMMPS.jl

Convert LAMMPS data files generated by LigParGen into molecule description and pair/bond/angle/dihedral/improper coeffs section for LAMMPS.

The utilities also "compress" atom, bond, angle and dihedral types, i.e. types with the same mass, $\varepsilon$ and $\sigma$ parameters are added as atoms of the same type (as opposed to the LigParGen data where each atom has its own type), bonds with the same parameters are added as the same bond type etc. Additionally, bonds, angles, dihedrals and impropers with zero energy parameters are excluded from the resulting molecule file.

Installation

The package is registered in a custom registry. To use another registry alongside the Julia General registry and install the package, enter the following commands:

julia> using Pkg

julia> pkg"registry add https://gitlab.com/pisarevvv/samma-registry.git"

julia> pkg"add LigParGen2LAMMPS"

julia> using LigParGen2LAMMPS

Usage

In the below examples, it is assumed that ligpargenfile is a LAMMPS data file generated by LigParGen.

read_lpg_data(ligpargenfile[; keywords...])

Read the datafile produced by LigParGen from ligpargenfile. ligpargenfile may be an I/O stream or a file name.

Keywords

  • compress_types::Bool=true: mark particles with the same LJ parameters as the same type

  • compress_btypes::Bool=true: mark bonds with the same parameters as the same type

  • compress_atypes::Bool=true: mark angles with the same parameters as the same type

  • compress_dtypes::Bool=true: mark dihedrals with the same parameters as the same type

  • compress_itypes::Bool=true: mark impropers with the same parameters as the same type

  • net_charge=nothing: if set to a number, the charges will be tweaked so that the total charge equals to the specified value. If set to nothing, the charges will be tweaked so that the net charge is the nearest integer value

    write_mol(f, ligpargenfile::AbstractString)

Read the molecular topology from file named ligpargenfile and write it into f in a format that can be read by LAMMPS molecule command. f can be an I/O stream or a filename.

write_ff(f, ligpargenfile::AbstractString)

Read the molecular topology from file named ligpargenfile and write its forcefield into f in a format compatible to LAMMPS input script. f can be an I/O stream or a filename.

write_mol_and_ff(fmask::AbstractString, ligpargenfile::AbstractString)

Read the molecular topology and forcefield parameters from ligpargenfile and write them into files "fmask.txt" and "fmask.ff", respectively.

References

  1. LigParGen website. http://zarbi.chem.yale.edu/ligpargen/
  2. Potential energy functions for atomic-level simulations of water and organic and biomolecular systems. Jorgensen, W. L.; Tirado-Rives, J. Proc. Nat. Acad. Sci. USA 2005, 102, 6665-6670
  3. 1.14*CM1A-LBCC: Localized Bond-Charge Corrected CM1A Charges for Condensed-Phase Simulations. Dodda, L. S.; Vilseck, J. Z.; Tirado-Rives, J.; Jorgensen, W. L. J. Phys. Chem. B, 2017, 121 (15), pp 3864-3870
  4. LigParGen web server: An automatic OPLS-AA parameter generator for organic ligands. Dodda, L. S.; Cabeza de Vaca, I.; Tirado-Rives, J.; Jorgensen, W. L. Nucleic Acids Research, Volume 45, Issue W1, 3 July 2017, Pages W331-W336