Using BAT Internal Coordinates

22 views
Skip to first unread message

lauren finn

unread,
Nov 22, 2021, 10:14:03 AM11/22/21
to MDnalysis discussion
Hello!

I've managed to calculate the configurational entropy for some dipeptides using cartesian coordinates. However, I would like to do the same calculation using internal BAT coordinates.

I see the module 4.2.7. Bond-Angle-Torsion coordinates analysis — MDAnalysis.analysis.bat and I am able to convert the trajectory and get an estimate under the new coordinate system. But I can't tell which bond / angle / torsion is referenced under each coordinate. The attribute "results.bat" explains the first 6 coordinates are the external degrees of freedom and "...the rest of the array consists of all the other bond distances, all the other bond angles, and then all the other torsion angles." But what specific internal coordinate is referenced in each column? Is there a way to determine this?

Best,
Lauren

Oliver Beckstein

unread,
Nov 22, 2021, 11:58:10 AM11/22/21
to mdnalysis-discussion
Hi Lauren,

Welcome to the MDAnalysis list!

I don’t have experience with the BAT module and I agree with you that you’re asking a very sensible question.

Looking at the code https://github.com/MDAnalysis/mdanalysis/blob/735abb8c76d71e1dc8197d73ee6f5d1845634914/package/MDAnalysis/analysis/bat.py#L405-L417 where the bonds are between _ag1 and _ag2, angles between _ag1, _ag2, and _ag3, and torsions _ag1, _ag2, _ag3, _ag4 it looks that everything is based on the “torsions list”, which is found in _torsions. I think your best bet (short of someone answering your question directly) is to look into  _agX .

The Cartesian() method has code to “conveniently split the BAT vector into new variables” at https://github.com/MDAnalysis/mdanalysis/blob/735abb8c76d71e1dc8197d73ee6f5d1845634914/package/MDAnalysis/analysis/bat.py#L495-L502 , which might help you with properly associating an internal coordinate with a pair, triplet, or quadruplet of atoms.

Oliver

--
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/ca6f5979-937b-4a57-8aaa-f256a2528b2an%40googlegroups.com.

--
Oliver Beckstein (he/his/him)







lauren finn

unread,
Nov 24, 2021, 6:39:56 AM11/24/21
to MDnalysis discussion
Hi Oliver,

Thanks to your pointers, I see now how I can associate the internal coordinates to the atoms given in the torsions and root atoms. In my case, I used:
  from MDAnalysis.analysis.bat import BAT
  bat = BAT(selected_residues)
  bat.run()
  torsions = bat._torsions
  root = bat._root
which gives a list AtomGroups containing 4 atoms, and an AtomGroup containing 3 atoms. So now I'm working on implementing an association between coordinate and atom indicies.

Thank you very much!

Lauren 
Reply all
Reply to author
Forward
0 new messages