jag1g13 / pdb2lmp

Convert PDB files to LAMMPS data and force field files.
MIT License
18 stars 3 forks source link

Index out of range error #4

Closed tejakondury closed 7 years ago

tejakondury commented 7 years ago

Hello,

I am getting an index out of range error while running the code:

Traceback (most recent call last): File "pdb2lmp.py", line 301, in conv.write_data(args.outfiles + ".data") File "pdb2lmp.py", line 170, in write_data print("{0:8.3f} {1:8.3f} xlo xhi".format(-cell[0], cell[0]), file=data) IndexError: list index out of range

I am not sure if it is something that I am not doing correctly or a bug.

Thank you.

jag1g13 commented 7 years ago

This issue appears when you have an input PDB that doesn't define a simulation box size with a "CRYST1" line. I'm going to change it so that instead of breaking, you'll get your output files with a warning that there's no box size set.

jag1g13 commented 7 years ago

Hopefully that resolves the issue for you, but let me know if it doesn't. Thanks for reporting it.

tejakondury commented 7 years ago

Issue resolved. Thank you. I just need to find a better .pdb file, because all the info required is not present in it (Cryst)