charmm2lammps counting one atom type less

Dear All;

I have a problem with charmm2lammps. Hope someone can help. In short, charmm2lammps is counting one atom type less in the data files.

I want to use charmm2lamps to convert PSF/PDB file into DATA/IN lammps format. So, I decided to test it with a TIP3P water box. First, I created a solvate box with VMD (solvate.psf, solvate.pdb). Second, I create topology and parameter files for TIP3P (top_TIP3P.rtf, par_TIP3P.prm). These topology/parameter file were taken from the CHARMM force field, the files are provided below. Finally, I run charmm2lammps as follows:

perl charmm2lammps.pl TIP3P solvate

During the execution, I got the following warning:

Warning: 1 atom types present, but only 2 pair coeffs found

then, when trying to run lammps, I got the following error:

ERROR: Unknown identifier in data file: 2 15.9994 (../read_data.cpp:654)

So far, the problem seems to be that charmm2lammps writing one atom type less, if you open the data file, you read:

1 atom types

But all other information about two atom types is written in the DATA file. I mean, masses, parameters and so on. If I open the data file and correct that line into:

2 atom types

the minimization/simulation proceeds.

I got a similar error when I build a protein/water system, which has much more atom types. In that case, charmm2lammps still counted one atom type less.

So, my question: is this "atom type" counting a minor bug?, am I doing something wrong?, are my topology/parameter files wrong?. Although simulations can run now, I got a bit apprehensive after this error, and I am wondering if charmm2lammps is still doing OK, as the last update was in 2005

Regards;

Eduardo

########## par_TIP3P.prm #######

* Toplogy and parameter information for water and ions.

Dear All;

I have a problem with charmm2lammps. Hope someone can help. In short, charmm2lammps is counting one atom type less in the data files.

eduardo,

i can reproduce your problem and i've filed it as issue #91 on the
LAMMPS project issue tracker on github.
the charmm2lammps.pl code is quite difficult to debug, so it may take a while.

one thing comes to mind, though. VMD/NAMD's psfgen generates psf files
by default in x-plor format. have you tried requesting the generation
of CHARMM format psf files?
this is pure speculation, but perhaps that difference is confusing the
code in charmm2lammps.pl (it should not, but who knows...).

axel.

Hi Axel;

Thanks for looking into this.

I just tried your suggestion, a PSF with charmm format (writepsf charmm xxx.psf) but still got the same error.

I also tried the example provided in the charrm2lammps directory as folllows:

perl charmm2lammps all27_na 1ac7

and got the same error, one atom type less in the data file. The same problem happens if you type the recommended command:

perl charmm2lammps all27_na 1ac7 -charmm -border-1 -pdb_ctrl -water -ions

Well, the charmm2lammps directory provides a output example (1ac7.data), which is right. So, that output was generated without problems (in June 3, 2005 at 14:07 :slight_smile: ) , but it cannot be reproduced now.

Regards;

Eduardo

Hi Axel;

Thanks for looking into this.

I just tried your suggestion, a PSF with charmm format (writepsf charmm
xxx.psf) but still got the same error.

yup. i think i have isolated the issue. it looks like a previous
bugfix included an off-by-one issue.
i've used the opportunity for a few additional minor improvements.
please try the attached version and let me know.

thanks,
      axel.

charmm2lammps.pl.gz (11.7 KB)

wow, many thanks!, greatly appreciated.

yes, it works nicely now.

added this to the repo - will be in the next patch

Steve