jag1g13 / pdb2lmp

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

VAL error #2

Closed micmalti closed 7 years ago

micmalti commented 7 years ago

I'm getting this error:

Traceback (most recent call last):
  File "pdb2lmp.py", line 299, in <module>
    conv.collect_types()
  File "pdb2lmp.py", line 99, in collect_types
    dbmol = self.moldb.molecules[mol.name]
KeyError: 'VAL'

I suspect that I should modify the pdb2lmp.py such that it recognizes the .pdb file which I'm trying to convert. Could you kindly tell me what I must do?

jag1g13 commented 7 years ago

It looks like you're trying to simulate a protein (I assume the residue name VAL is valine). Unfortunately, the ELBA forcefield that PDB2LMP was created for doesn't support proteins.

If you want to use PDB2LMP to set up protein simulations in LAMMPS you'll have to create some new forcefield database files (as seen in https://github.com/jag1g13/pdb2lmp/tree/master/data) that contain the parameters of whichever model you would like to use.

I'll modify the code to give a proper error message when an unrecognised residue name is found.

jag1g13 commented 7 years ago

The error message has been made more informative in commit d4b711a.

I've opened another issue (#3) to add other forcefields to the database in the future so people can simulate a wider range of molecules, but I can't promise I'll get round to it soon.

micmalti commented 7 years ago

Thank you for your prompt reply.

jag1g13 commented 7 years ago

Marking issue as closed since a proper error message has been added when a molecule is not defined in the forcefield. I would like to add more forcefields in the future, but that is currently low priority.