2

I have a lammps_file.data and I need to convert it to Gromacs files (gro and top) to run my simulations. Does anyone know how to do this? Another choice is to convert from lammps to charmm files (psf and pdb). Once I get the charmm files I can just use Topotools to get the gromacs files I need.

Thanks

ananvodo
  • 371
  • 5
  • 13

1 Answers1

1

Indeed, NOW I am trying to do the same myself. So far, you can use intermol , this should work fine to convert LAMMPS data files to Gromacs files. Once you install intermol, and you ceate a path to the intermol converter, you can use a command like:

python2.7 $conv/convert.py --lmp_in topology.data --gromacs -v

CHECK the format of your data file, I still having problemst to convert it.

If you wish to create the psf file, you would need VMD (google it), then open the tcl terminal and write :

topo readlammpsdata topology.data full
animate write psf topology.psf

The 1st line is for loading yur LAMMPS data file, if you are in the folder where that files is located 2nd convert the data to psf CHARMM

Also, you could try this. In this paper, they provide a tood to conver CHARMM topologies to gromacs here. Thus, you convert to psf, then to gro top.

Apolionl
  • 33
  • 5
  • Thanks for your help! I used InterMol but I get this error: intermol.exceptions.UnimplementedSetting: ['pair_style', 'none'] has not yet been implemented in InterMol for LAMMPS. Have you ever had this message? – ananvodo Jul 26 '18 at 21:24
  • Given that intermol failed due to "not implemented" my best approach is to convert to charmm files and then use topo writegmxtop (in VMD) to get the gmx files. Thanks for the steps to get the psf file (I did not know that). I just need the pdb file to use topotools, do you think that openbabel is the best choice? BTW I have the car and mdf files (from MSI), maybe that can help you to provide me with a better suggestion (To get the lammps data file I used msi2lmp script). – ananvodo Jul 26 '18 at 21:31
  • I think that you are not getting the expected resilt from intermol cause , you are not providing the "correct parameters", I mean in the way 'exactly the way' they are provided in the test files. I had the same problem, not I am trying to convert the file, but I saw your question and i decided to answer first. – Apolionl Jul 26 '18 at 21:34
  • thanks. I'll give the test files a look. They are in Beta stage so I thought that my message could be possible. To get the lammps data file I used msi2lmp script. I am using interfaceff and they already have the frc file so it was pretty straightforward for me. – ananvodo Jul 26 '18 at 22:03
  • Unfortunatelly, I have nerver used MSI. I reckon intermol. Are you sure VMD can not convert your trajectories? take a look to the files it can read http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/ – Apolionl Jul 26 '18 at 22:48
  • @ananvodo @Apolionl The reason for `['pair_style', 'none']` error in `intermol` I'm afraid is not related to providing "correct parameters", but however it occurs because that declaration is not defined nor implemented in `intermol`, as is said here: https://github.com/shirtsgroup/InterMol/issues/345 – DavidC. Feb 18 '22 at 11:16
  • @ananvodo @Apolionl This leaves the only practical option to be the conversion of lammps files to charmm files via Topotools's `readlammpsdata` functionality. There is however the following problem with this option - see next comment: – DavidC. Feb 18 '22 at 11:25
  • @ananvodo @Apolionl Typically, in lammps the file that contains most of the topology information is the `.in` file, where precisely the aforementioned `pair_style` definitions are declared, as well as the `read_data externalfile.data` instruction, which will read the coordinates from an `externalfile.data`. Now, the problem is that `topo readlammpsdata externalfile.data full` will *NOT* be reading the force field info contained within the `.in` file. Hence the psf file generated will be wrong! – DavidC. Feb 18 '22 at 11:26