This patch file facilitates the use of the SPICA force field with GROMACS. This patch replaces the bond-angle cross potential with the SPICA angle potential, incorporating a correction LJ potential term to prevent an implausibly bent structure in MD simulations.
NOTE: Upon applying this patch to GROMACS source codes, you can no longer use the bond-angle cross term (angle index = 4) in GROMACS programs built with the codes. Additionaly, GPU acceleration in GROMACS will not work in MD simulations with SPICA because it requires the application of tabulated potentials for nonboneded interactions used in SPICA.
Source code of GROMACS-2019.6 : gromacs-2019.6.tar.gz
https://manual.gromacs.org/documentation/2019.6/download.html
or
Source code of GROMACS-5.1.5 : gromacs-5.1.5.tar.gz
https://manual.gromacs.org/documentation/5.1.5/download.html
Apply patch command in the top source directory
git clone git@github.com:SPICA-group/gromacs-SPICA.git
wget http://ftp.gromacs.org/pub/gromacs/gromacs-2019.6.tar.gz
tar xvzf gromacs-2019.6.tar.gz
cd gromacs-2019.6/
patch -p2 < ../gromacs-SPICA/gromacs-2019.6-spica_angle.patch
Then, build the codes by following the GROMACS installation guide.
For reversing the patch, excute the following command in the top source directory
cd gromacs-2019.6/
patch -p2 -R < ../gromacs-SPICA/gromacs-2019.6-spica_angle.patch
Tutorials for preparing input files for CG-MD simulations with SPICA using LAMMPS are available on the SPICA website. For GROMACS usage, employ the command setup_gmx from spica-tools, instead of setup_lmp for LAMMPS, to generate topology, index, and parameter files.
For instance, in Step 2 of the tutorial for lipid membrane systems,
the process before using setup_lmp
will be the identical for GROMACS simulations with SPICA.
The command-line to prepare some GROMACS input files will be like:
cg_spica setup_gmx DOPC.top 128 WAT.top 3000 spica_db.prm
The PDB files are not needed for this command because the generation of GROMACS itp and index files by this command does not require any system configuration information.
Upon excuting the command-line, the generated files will contain the following:
topol.top
(system topology file)toppar/
SPICA.itp
(parameter file){Molecule1}.itp
(topology files for each molecule){Molecule2}.itp
...
CGindex.ndx
(index file)out.psf
(PSF file for visualization)
Tabulated potentials for nonbonded interations applied in SPICA, namely, LJ12-4 and LJ9-6 potentials (see the Force Field page) require table files formatted following the GROMACS manual for using tabulated potentials. Generate these files with the following command gen_gmxin:
cg_spica gen_gmxin -pdb final.pdb -ndx CGindex.ndx
An example GROMACS mdp file (npt.mdp
, by default) for SPICA will be also generated (please add -pspica
option when using the pSPICA models).
The output files include:
table_SOLW_SOLW.xvg
(water-water, LJ12-4)table_LJ124W_SOLW.xvg
(water-others, LJ12-4)table.xvg
(other pairs, LJ9-6)npt.mdp
The command-lines to execute the two commands, grompp
and mdrun
, of GROMACS patched for SPICA will look like:
gmx_mpi grompp -f npt.mdp -c final.pdb -p topol.top -n CGindex.ndx -o npt.tpr -maxwarn 5
gmx_mpi mdrun -v -deffnm npt -table table.xvg
Yusuke Miyazaki