error in generating lammps data file from crd and top files

This is what is causing the problem, I think… in your CRD file as Chang suggested… Rectify that and try again.

This is what is causing the problem, I think... in your CRD file as Chang
suggested... Rectify that and try again.

not sure if that can be called "wrong". amber file formats are based
on fortran formatted i/o, aren't they?
in that context, those "connected" columns are perfectly valid.

thus formatted column based fortran output has to be parsed slightly
- first you have to chop each line into fixed length strings
- then parse each chunk separately.

if you just split by whitespace you are not 100% following the format.
the same is true for example for .pdb files and may .pdb file parsers
and writers are not standard conforming (in fact, so many, that we
adjusted the VMD plugin for it to be able to detect and handle both


Dear Wen,
As Axel mentioned correctly, you have two options.

  1. Modify so that it parses .crd file as fixed length strings and then get your file in lammps format.

  2. Open your system in xleap (AMBER gui), and shift all the atoms so that no coordinate is less than > -99.99

  3. Save new .top/crd file and try amber2lammps.

Best Regards,


Would you send original .top and .crd files you sent to Vikas? I simply added and modified few lines in It works fine for .crd files in the same situation as yours. I would like to test your case as well.

C.W. Jang