# Building an average model from MD snapshots

I am performing a molecular dynamics simulation, and I am taking "snapshots" of the system at regular intervals.

The aim is that of finding the preferred geometry of a molecule in solution.

Are you aware of any software capable of automating to some extent the superposition of different geometries, and maybe of building an "average" structure?

• I think what you are asking is a fairly difficult and likely not automatable procedure as the details will vary a lot depending on what you are interested in and the system you are studying. The simplest (but not necessarily simple) thing to do is just define a set of internal coordinates and transform your cartesians to these and average over your snapshots. – jheindel Jun 7 '19 at 19:46
• I have also been a part of a project where we were interested in averaging over a particular coordinate that is sensitive to low frequency vibrations which themselves are sensitive to thermal fluctuations. So, we first performed a Fourier filtering over these low frequency vibrations and then averaged the ones we were actually interested in. I'm just trying to get across that doing this in a reliable manner can be highly non-trivial and is certainly not unique as the systems get bigger and which coordinates are good ones becomes less obvious. – jheindel Jun 7 '19 at 19:47
• Indeed, averaging the coordinates was my idea as well, but I hoped in a less time-consuming procedure :) – The_Vinz Jun 7 '19 at 19:47
• Ya, unfortunately defining coordinates is the bane of many computational chemists' existence. It is time-consuming and often has to be done by hand if you want to be able to easily interpret the chemical relevance of the coordinates. The actual transformation from one set to another isn't too bad, but you have to write the code to do it at least once. I don't know of any well-established code to do this, but maybe there's a github repo somewhere... – jheindel Jun 7 '19 at 19:50
• GROmaps may be an option for you too GROmaps – B. Kelly Jun 11 '19 at 16:53

This is possible with the Python package MDTraj. Assuming you have your trajectory saved as trajectory.dcd and topology in topology.pdb:
import mdtraj as md