TinkerTools / tinker

Tinker: Software Tools for Molecular Design
https://dasher.wustl.edu/tinker/
Other
130 stars 61 forks source link

Request to include addition of hydrogens in the molxyz program #100

Closed Sowmya-R-Krishnan closed 2 years ago

Sowmya-R-Krishnan commented 2 years ago

Hi all,

I tried using the pdbxyz and molxyz programs to obtain the TINKER XYZ input file format and further minimize the structures. While running pdbxyz program, I noticed that the program itself adds hydrogens to structures provided without hydrogens as input. But when I analogously supplied some unprotonated structures in .mol file format as input to the molxyz program, the program did not add any hydrogens to the output .xyz file. Is it possible to include the addition of hydrogens in the molxyz program as well?

Thanks and regards Sowmya

jayponder commented 2 years ago

The short answer is that this is not possible. Or at least it is very much more difficult, and something that we don't want to build into Tinker. The reason is that proteins and nucleic acids are "well defined". We know what the amino acids and nucleotides are, and we with the exception of alternative HIS protonation states and such, we know where the protons should be. If you just input the non-hydrogen atoms for an arbitrary molecule, it is harder to figure out what the molecule is and where the protons go.

The above said, there are programs that will do this for you. I'd suggest you use some other program to add hydrogens before using Tinker. You will have to do web searches to find an appropriate "hydrogen adding" program- maybe OpenBabel will do it, I'm not sure..

Sowmya-R-Krishnan commented 2 years ago

Thank you @jayponder for the kind reply. Before posting the issue I tried OpenBabel as well for adding Hydrogens to the .mol file, but using the file with TINKER MINIMIZE program with AMBER-99SB force field gave me the following error:

MECHANIC -- Some Required Potential Energy Parameters are Undefined

I have attached here the .mol file (with hydrogens added using Openbabel) and .xyz file (obtained with molxyz program in TINKER).

Peptide_1_coil.mol.txt Peptide_1_coil.xyz.txt

jayponder commented 2 years ago

This is not a "bug" in OpenBabel or in Tinker, but I'm afraid it is the expected behavior. The column just to the right of the x-, y- and z-coordinates in Tinker XYZ files contains an "atom type" number that is specific to the force field being used. This means that you need a different Tinker XYZ file for a given molecule depending upon which force field you are using.

From the files you attached, it seems OpenBabel is adding hydrogens, but it is using what Tinker calls the "basic" force field. Note that in the XYZ file you attached, the column to the right of the coordinates contains a number that is 10X the atomic number of the atom plus the valence. For example, tetravalent carbons are atom type 10 X 6 + 4 = 64. This is the simple scheme used for atom types in the "basic" force field. But atom type numbers are totally different in Amber ff99SB. It is "easy" for OpenBabel to generate the "basic" atom type numbers, but it would be very difficult for OpenBabel to generate a Tinker XYZ file with Amber ff99SB atom types.

This is a very common problem with many force field calculations and software packages- you need to have some method of assigning the "atom types" (and based on these atom types, all the rest of the force field parameters) for your molecule using the force field you desire. Making this assignment of atom types generally involves "messy" code that knows about organic functional groups, structural chemistry, etc. Some packages do this using SMILES strings or similar to encode molecules. Tinker does not have any built-in mechanism for doing atom type assignments, other than for biopolymers as in the Tinker PDBXYZ program.

Some of the developers of force fields that Tinker supports now provide servers that will write out Tinker XYZ and parameter files starting from just coordinates or connectivity. For example, the LigParGen server will produce Tinker files for the OPLS-AA force field given any input molecule. I do not know of any such server for Amber that writes Tinker files. So if you wish to use Amber ff99SB for molecules beyond what PDBXYZ can translate, you will need to assign atom types manually. We and others are working on solutions for these situation. For example, our plan is to write a program to translate "basic" force field atom types into the correct types for other standard force fields like Amber. But that's a fairly large amount of work, and won't be finished soon. Unfortunately, at present, there is no simple way to automatically do what you need.