Exporting topologies and potentials

Preparing a set of input files for particular MD simulation package is quite a challenge even for an experienced user, especially in case of custom coarse-grain models, having no support of well established force-fields and all-atom structure generating tools. In order to facilitate preparation of input files, MagicTools provides a number of exporting procedures. At present moment we support export to the following packages: LAMMPS, GROMACS, GALAMOST.

The export procedure consists of two semi-independent steps: Export of the potentials and export of the topology. The first step is addressed by the potential exporting procedure [PotsExport]PotsExport, please also take a look on the [PotExportDetails]export procedure details in section [*]. The second step is performed by one of three topology exporting procedures: [LAMMPSTopology]LAMMPSTopology, [GromacsTopology]GromacsTopology and [GALAMOSTTopology]GALAMOSTTopology. These routines have very similar interface. They internally create instances of the system and then call one of the methods WriteLAMMPSData, WriteGromacsTopology, WriteGALAMOSTxml of the [System]System class.

Since each MD package has it's own file format, we suggest the user to check the documentation for the desired package, to understand the structure of topology files produced by MagicTools.

LAMMPS topology consists of two files: The first one is LAMMPS.data, which stores most of the topology and can be opened with VMD, using
topo readlammpsdata LAMMPS.data command. The second one is LAMMPS.data.run.inc, which assigns potential table files to all corresponding interactions. The only missing file (beside tabulated potentials, generated above) is the input file with the simulation parameters. We recommend to check out Tutorials to see some working examples.

GROMACS requires five types of files: the topology file (.top), the starting geometry (.gro, .pdb) and the index file (.ndx), the simulation parameters (.mdp) and the tabulated potentials (.xvg). [GromacsTopology]GromacsTopology creates the topology file and the starting structure. Moreover, the corresponding .gro-file has atom types used instead of atom names, in order to simplify generation of the index file. The index file shall have a separate group for each atom type, and the group shall have the same name as the corresponding atom type. Use Gromacs tool gmx make_ndx -f geometry.gro -o index.ndx to generate the file. The user has to manually add all atom types and pairs of atom types to the .mdp-file parameters energygrps and energygrp_table, correspondingly. These values are displayed in the output of the potential export routine, so it only takes a copy-paste to add them to the mdp-file.

It is also possible to use [xmol2gro]xmol2gro to convert .xmol structure file into .gro format. Another workaround is to use VMD for opening .xmol and saving it in .pdb format.

GALAMOST requires 5 files: The execution script *.gala, the topology file in HOOMD Blue xml format, the tabulated potential assignment file tables.inc.py, and two exclusions files exclusionsEL.inc.py and exclusionsSR.inc.py, specifying exclusions for electrostatic and short-range interactions.

[GALAMOSTTopology]GALAMOSTTopology creates all of these files, except the execution script, which describes the protocol of the simulation and shall be provided by the user. Note that the files tables.inc.py, exclusionsEL.inc.py and exclusionsSR.inc.py have to be included into the execution script (see Tutorials for actual examples).