Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lammps-tools

Julien Devemy

Miscelaneous tools for LAMMPS.

Contents

  • create_conf: create initial input files for LAMMPS, with polarizability (drudes) and/or free energy calculations.

  • zmat2xyz: convert .zmat files to .xyz (with connections).

  • fusion_mols: fusion two .xyz files (for free energy calculations).

  • fep fdti nti bar: scripts to analyse energy results from a LAMMPS fep output file.

  • lib/*: various libraries used by the scripts.

  • data/*: various data files.

  • examples/*: examples.

Requirements

Obtaining

Clone the repository (easier to stay updated):

git clone https://github.com/jdevemy/lammps-tools.git

Install the software :

cd lammps-tools
python setup.py build
sudo python setup.py install

How to use

Normal simulation (without polarizability nor free energy calculations):

  1. For each molecule or ion prepare a file containing a z-matrix (molecule.zmat). See the examples directory and check the Wikipedia entry for "Z-matrix (chemistry)" (examples taken from Agilio Padua's fftool project).

    The script determines the connectivity (which atoms are linked by covalent bonds) from the z-matrix. Cyclic molecules require additional connect records to close rings.

    Improper dihedrals cannot be inferred from connectivity and must be indicated by improper records.

  2. Create one or multiple force fields file parameters:

    You can choose to create only one file for all the molecules (database.ff), or create one for each molecule (spce.ff, CC.ff, ...).

    For the format of the .ff file, see the examples directory or see Agilio Padua's ilff project.

  3. Convert each of the .zmat files to a .xyz:

     zmat2xyz spce.zmat
     zmat2xyz CC.zmat
    
  4. Create a packmol input like:

     tolerance 2.0
     filetype xyz
     output simbox.xyz
     add_box_sides 2.0
     structure CC.xyz
     number 1
     inside box -13. -13. -13. 13. 13. 13.
     end structure
     structure spce.xyz
     number 360
     inside box -13. -13. -13. 13. 13. 13.
     end structure
    

    And pack

     packmol < pack.inp
    
  5. Run create_conf:

     create_conf -m 2.0 simbox.xyz 1 CC.xyz CC.ff 360 spce.xyz spce.ff  
    
  6. Run LAMMPS with the in.lmp and data.lmp files generated by create_conf:

     mpirun -np 12 -np 12 /opt/lammps/lmp_openmpi -i lammps.input
    

Simulation with polarizability (drudes):

It's the same as the normal simulation but:

  • the .ff files must provide the polarizability value of each atom, which corresponds to the 8th column in the file, and the thole factor (i.e. 2.089) in the 9th column of the file.

  • the option -p should be added to the create_conf command line.

  • the option --dm can be used to change the mass of the drude, and --dk to change the stiffness of the core-drude bond.

  • run LAMMPS as usual (LAMMPS should be compiled with the package user-drude)

Simulation with free energy calculations:

The steps are quite the same as the normal simulation, but you should fusion two molecules :

  • you should provide a .ff file containing the parameters of both the molecules to fusion (CC-CO.ff).

  • you should fusion the 2 molecules :

    fusion_mols CC.xyz CO.xyz CC-CO.ff
    
  • do the packing using the resulting molecule (CC-CO.xyz).

  • run create_conf indicating the free energy type (fep01, fep10, fdti01, fdti10, bar01, bar10). For more infos, cf https://github.com/agiliopadua/compute_fep.

    The command line will look like :

    create_conf --freetype fep01 -m 2.0 simbox.xyz 1 CC.xyz/CO.xyz CC-CO.ff 360 spce.xyz spce.ff 
    
  • run LAMMPS as usual (LAMMPS should be compiled with the package user-fep)

  • you can then output energy results using the fep output files (fep01.lmp, fep10.lmp, ...) with the corresponding scripts: fep, fdti, nti and bar.

References

About

Misc tools for LAMMPS

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages