-
Notifications
You must be signed in to change notification settings - Fork 25
Using LOOS with Tinker
The main challenge with using LOOS to analyze Tinker simulations comes from choosing which file format to use as the system file. Tinker's XYZ format has one notable advantage -- it contains connectivity information -- and one disadvantage -- it has very little other metadata (eg residue names or numbers). Depending on what you're doing with LOOS, one or the other might be more convenient.
Several of the trajectory curation tools explicitly need to know where the bonds are in order to function optimally. Tools like merge-traj
or subsetter
(or pretty much any tool that does reimaging) need to know where the bonds are in order figure out how to move molecules as a whole. For these tasks, the XYZ file is generally going to be better, unless you've made a PDB file that has all of the bonds present as CONECT records (more on this below).
On the other hand, a PDB file has lots of metadata information. Sometimes, this is just a convenience, in that it can make selections easier (it's much easier to select 'resname == "TRP"'
than the equivalent atom number ranges). However, there are also tools that explicitly need residue names and numbers to function correctly. For example, tools like contact-distance
or all_contacts.py
operate on biopolymers residue by residue.
You have to be careful where you get the PDB file from, however. LOOS assumes that the trajectory file has the atoms in the same order as in the system file (we have to, since most trajectory file formats contains no metadata at all). However, Tinker's xyzpdb
tool reorders the atoms as part of the conversion, which means that using the resulting PDB file will yield incorrect results. Alternatively, if you used CHARMM-GUI or something similar to make the pdb file, you should be fine.
Luckily, we've added a solution to this problem. Assuming you have a correct PDB file (identical atoms in the correct order), the tool add_bonds.py
can copy the bond information from the equivalent XYZ file into a new PDB file with something like:
add_bonds.py ref.pdb ref.xyz new.pdb
The resulting PDB file (new.pdb
), will have identical metadata to ref.pdb
, but the bond information from ref.xyz. Please note that this program doesn't check to make sure the atom order is correct (we can't, because the CHARMM-GUI atom names often don't match the Tinker ones), just that the number of atoms matches.