Hi,
I would like to use the tinker2lmp.py script in order to run a lammps MD simulation on a small organic molecule using the AMOEBA force field. For this I read the tutorial “8.4.2. AMOEBA and HIPPO force fields — LAMMPS documentation” where at one point it suggests to use the tinker2lmp.py script in order to generate a lammps data file that is parameterized according to a force field of my choice.
After performing the following command: ./pdbxyz, then i gave it the pathway to my pdb file, then the pathway to the amoebabio18.prm file, it gave me the tinker xyz file. It is this xyz file that i used for the following command that gave the error: $ python tinker2lmp.py -xyz test.xyz -amoeba amoebabio18.prm -data data.test.amoeba
ERROR: bond not found: 1 2: 17 5
Does anyone have similar issues? How else would you parameterize ligands with the amoeba force field?
Here is the input xyz file if you want to reproduce the error:
9
1 C -0.000000 0.000000 0.000000 64 2 3 4 5
2 H -1.000000 0.000000 0.000000 11 1
3 H 0.358000 -0.934000 0.000000 11 1
4 H 0.358000 0.467000 0.809000 11 1
5 O 0.505000 0.658000 -1.140000 82 1 6
6 C 1.914000 0.702000 -1.216000 64 5 7 8 9
7 H 2.111000 1.248000 -2.179000 11 6
8 H 2.349000 -0.323000 -1.269000 11 6
9 H 2.348000 1.276000 -0.362000 11 6
i tried multiple test molecules which all gave the same error.
Hi - that error is generated when the tinker2lmp.py tool does not find the needed bond listed in your PRM file. In this case, it is the bond between atoms 1 and 2, which map to PRM classes 17 and 5. That mapping is determined by the Atom Type Definitions section of the PRM. The Bond Stretching Params section of the PRM lists the bond params. That section has params listed for pairs of classes (not pairs of atom types). So I am guessing the class pair 5,17 or 17,5 does not exist in your PRM file.
If the PRM looks fine, then please post it so we can reproduce the error. Possibly it is a bug in the tinker2lmp.py script.
As a new user i apparently cannot upload files, and the .prm files are too big to copy-paste in this message. But i used the amoebabio18.prm file from ( tinker/params at release · TinkerTools/tinker · GitHub ) which is also recommended from the tutorial.
I myself also think it is a bug in the python script, since I have tried several types of .prm files and it is always the same atoms (the very first one in the list) to which a wrong atom class is given. Meanwhile, I have been tinkering with the script myself and found out that the recognition of the atom types is correct, but it is the conversion of atom types to atom classes where I think there is a bug. In any case, good luck!
So I reproduced your error, using your xyz file (9 atoms) and amoeba 18 PRM file you posted.
The issue is what I explained earlier, but now I can explain it with your 2 files.
(a) The first 2 atoms (1,2) in your xyz file have “PRM types” 64 and 11
(b) In your PRM file, look at the Atom Type Definitions section, at lines 64 and 11
The 3rd column on those lines is the “PRM class”, which is 17 and 5 for these 2 atoms
(c) There is a bond between atoms 1 and 2, as listed in your xyz file (atom 1 is bonded to 2,3,4,5)
(d) In the PRM file, bond params are listed in the Bond Stretching Parameters section
Bond params are not listed by PRM types, but by PRM classes.
The 2nd/3rd columns in that section are the two class IDs
The last 2 columns are the numeric bond params (prefactor K and distance in Angs)
(e) For the bond between atoms 1,2 in your xyz file, this PRM file thus requires
a bond entry for PRM classes 17 and 5.
If you scan the list, you will see it does not exist.
Hence the error.
If you do the same exercise for the xyz and PRM files in examples/amoeba you will see this is
never an issue. Which is why tinker2lmp.py works with all those files.
My guess is you have somehow generated or found an xyz file which does not match the PRM file.
Possibly my understanding of PRM file formats is limited and there are multiple formats for valid PRM files or multiple different flavors of xyz files which are supported by Tinker. Though I doubt it b/c I worked with a Tinker developer to write tinker2lmp.py
Thank you for your reply. But then how do i generate a correct xyz file that does match the PRM file? Is there any tutorial i can follow for this? Because as far as understood using the pdbxyz (from tinker itself) was the way to do it.
On a more (or less?) serious note, isn’t an xyz file just a list of coordinates? That’s pretty easy to generate with plenty of online tools – LigParGen generates MD files (https://zarbi.chem.yale.edu/ligpargen/), but you can also use Molview whose interface I love (https://molview.org/) and download the MOL file from “Tools”.