How to create Atoms instances using MDAnalysis?

Looking through the documentation several times and spending several hours on various ideas, I decided that I needed a hand. I am writing Python software that goes through NAMD modeling of RADA proteins, calculating the various values โ€‹โ€‹that interest us.

Currently, my code goes through every time step, then goes through every atom in the system, performing various analytical steps.

What I need to do is to combine each amino acid into my own "atom" (a one-position representation of the amino acid located in the center of the mass residues).

Is it possible to create new atoms and add them to the MDAnalysis Universe? Can I populate these new atoms with data such as my amino acid center, human-readable name, etc.

Sort of:

u = MDAnalysis.Universe(psf, coordDcd) ag = u.selectAtoms(" the atoms in my amino acid ") amino_acid = MDAnalysis.Atom amino_acid.pos = ag.centerOfMass() 

I know how to read the NAMD simulation (.dcd files), and all atoms are represented by a fine, but in the end I need to turn ~ 20 atoms into one โ€œaveragedโ€ atom (to simplify the calculations).

+6
source share

All Articles