SPICA: Surface Property fItting Coarse grAined model

Tutoriallipid membrane

Step 2. Convert PDB file to LAMMPS input file

In the previous step, we prepared the input PDB files either in CG or AA (step5_assembly.pdb) format.
In the "AA PDB file -> CG PDB file" section, we will introduce a command of the spica-tools, map2cg, to convert AA PDB file to CG PDB file for users building AA PDB files. If you already have CG PDB files, you may skip this section.
Since LAMMPS reads its own formatted data file, it is required to convert the PDB file to LAMMPS data file. To convert CG PDB file, we provide another command of the spica-tools, called setup_lmp. In the "CG PDB file -> LAMMPS input file" section, we will introduce how to use setup_lmp. * The commands start with "$" and "%" in the gray source code box are for bash shell (or any linux shell) and TCL shell on VMD, respectively.

AA PDB file -> CG PDB file

We use the command-line tool cg_spica to convert the AA PDB file to CG PDB file, as mentioned in the first page of the tutorial. This tool includes a CG mapping command map2cg, which is to convert AA PDB to CG PDB based on mapping information described in a JSON file (for details to its document). For typical lipids, thier mapping information is already written in the JSON file. So, for the target system containing DOPC lipids and water, we just excute the following command to map the AA PDB to CG PDB:

$ cg_spica map2cg step5_assembly.pdb final.pdb

The first and the second arguments following "map2cg" are input AA PDB and output CG PDB, respectively. Please make sure that the console finally outputs "Normal termination" without any errors after invoking the command. The obtained CG PDB final.pdb will be used to generate LAMMPS input files in the next section.

CG PDB file -> LAMMPS input file

Before using setup_lmp, we need to add the information manually with an unix command because the PDB file generated with CHARMM-GUI does not have the simulation box information. The command should be like:

 $ sed -i 1i"CRYST1   66.790   66.790   79.000  90.00  90.00  90.00" final.pdb

The simulation box size is written in the step5_assembly.str file included in the generated CHARMM-GUI top directory.
To execute setup_lmp, one should provide the topology and number of molecules, database file, and input PDB file as arguments. For example, if the PDB file, named final.pdb, contains 128 DOPC lipids and 3000 water molecules, the command will be:

$ cg_spica setup_lmp DOPC.top 128 WAT.top 3000 spica_db.prm final.pdb

where the DOPC.top and WAT.top contain the topology of DOPC and water molecule, respectively. spica_db.prm is the force field file we provide. final.pdb is the PDB file contains the intial CG coordinates. One should be careful with the order of arguments. Especially, molecule topology and number should be the same as in the PDB file.
For the topology files, they are included in the force field file (Check topology/*.top included in spica_v1.1.tar.gz ). Other topology files can be generated with another spica-tool command json2top, based on mapping information in the JSON file (for details to its document).
If the conversion is successful, setup_lmp will generate three output files,
  • DATA.FILE
  • PARM.FILE
  • out.psf
The input script will read these files. The contents of DATA.FILE can be visualized on VMD with Topotools.

% package require topotools
% topo readlammpsdata DATA.FILE

You can also visualize the CG configuration with the PSF file (out.psf) and the CG PDB file (final.pdb):

$ vmd out.psf final.pdb

Please make sure that all the bond connection are correct in the visual ways.

Previous Top Next

SPICA Force Field

Research Institute for Interdisciplinary Science (RIIS)
Okayama University