Questions tagged [mdanalysis]

MDAnalysis is an object-oriented python toolkit to analyze molecular dynamics trajectories. It allows one to read molecular dynamics trajectories and access the atomic coordinates through NumPy arrays. This provides a flexible and relatively fast framework for complex analysis tasks. Fairly complete atom Selection Commands are implemented. Trajectories can also be manipulated and written out in a range of formats.

MDAnalysis is an object-oriented python toolkit to analyze molecular dynamics trajectories generated by CHARMM, Gromacs, Amber, NAMD, or LAMMPS; it also reads other formats. It can write most of these formats, too, together with atom selections for use in Gromacs, CHARMM, VMD and PyMol.

It allows one to read molecular dynamics trajectories and access the atomic coordinates through NumPy arrays. This provides a flexible and relatively fast framework for complex analysis tasks. Fairly complete atom Selection Commands are implemented. Trajectories can also be manipulated (for instance, fit to a reference structure) and written out in a range of formats.

37 questions
6
votes
1 answer

How to instantiate Atoms using MDAnalysis?

After looking over the documentation a few times and spending a handful of hours trying various ideas, I've decided I need a hand. I'm writing Python software that steps through NAMD simulations of RADA proteins, computing different values we're…
growling_egg
  • 307
  • 1
  • 9
3
votes
1 answer

How to display a Protein Data Bank PDB in a Jupyter notebook?

I am trying to follow this post, but it fails to display a PDB inside a Jupyter notebook: import MDAnalysis as mda import nglview as nv from nglview.datafiles import PDB, XTC u = mda.Universe(PDB, XTC) protein = u.select_atoms('protein') When I…
0x90
  • 39,472
  • 36
  • 165
  • 245
2
votes
1 answer

How to calculate center of mass of proteins using MDAnalysis?

I'm in a bit unusual situation. There are seven different proteins stored in a single file according to their residues names. Each protein has different sequence length. Now I need to calculate the center of mass of each protein and generate a time…
Advaita
  • 45
  • 6
2
votes
1 answer

How to iterate efficiently through MDAnalysis trajectory and save residue attribute time series?

I have some working code using MDAnalysis that saves the residues center of mass time series in an array, but I wonder if there is a more Pythonic or overall efficient/fast way (comprehensions, array operations...) to do it. import MDAnalysis as…
2
votes
1 answer

Obtaining Radial Distribution Functions using MDAnalysis

I am running a simple benzene simulation in GROMOS54a7. I want to calculate the RDF of the center of masses of each benzene molecule, using MDAnalysis 1.0.0. Is this possible? I have create the rdf for the C molecules g_cc(r) using the following…
megamence
  • 335
  • 2
  • 10
2
votes
1 answer

How to load .prmtop and .crd files from Amber using MDAnalysis?

I am trying to load a .crd file from Amber, but this fails because it's not in the format MDAnalysis expect (see error at the end): topology = 'top.prmtop' trajectory = 'amberOut.crd' u = MDAnalysis.Universe(topology, trajectory) I saw this thread…
0x90
  • 39,472
  • 36
  • 165
  • 245
1
vote
1 answer

Understanding Density object obtained from MDAnalaysis DensityAnalysis

I am having trouble understanding what exactly the Density object produces from the DensityAnalysis class. The documentation is found here. Running the code is not the problem, but understanding what exactly the Density object produces and how to…
1
vote
1 answer

MDAnalysis: Trajectories saved from Readers of the same Universe are incorrect

I have three trajectory replicas (xtc) of a membrane protein in a simulated physiological environment (water, ions, membrane...) in a MDAnalysis' (2.2.0) Universe. I want to save other three additional xtcs that contain only the trajectory of the…
1
vote
1 answer

TPRParser in MDAnanlysis has no attribute 'parser'?

I'm trying to use the TPRParser to parse the TPR file generated from GROMACs. Unfortunately it throws a error which I've never seen before: Traceback (most recent call last): line 43, in topo =…
Advaita
  • 45
  • 6
1
vote
1 answer

MD analysis using Python

I am trying to run this command: python3 traj_orientation-group.py -g fnIII-9_ps20_Nchain6_T298_nw.gro -x fnIII-9_ps20_Nchain6_T298_nw.xtc -o fnIII-9_ps20_Nchain6_run1.phrsn-orientation --protein_res_start 1 --protein_res_stop 89 –group 51 52 53 54…
1
vote
2 answers

MDAnalysis comparing position of ion in trajectory to previous ts

So I have a system where I need to be able to determine the exact position of my ions and run an equation on the average position of that ion. I found my ion positions were inconsistent due to some ions wrapping across the periodic boundary and…
1
vote
1 answer

Getting the charge of a single atom, per loop in MD Analysis

I have been trying to use the partial charge of one particular ion to go through a calculation within mdanalysis. I have tried(This is just a snippet from the code that I know is throwing the error): Cl = u.select_atoms('resname CLA and prop z <=…
1
vote
2 answers

How to use atomselect to specify atomNumbers/Index position in a pdb file for MDAnalysis?

After reading through the documentation I still have not been able to figure out a way to select one specific atom in my pdb file with MDAnalysis. For my project I am essentially pulling a chloride through a membrane channel in an applied electric…
1
vote
1 answer

Using MDAnalysis to extract coordinates in an array from pdb

I have a pdb file that is a subset of a much larger system. This pdb is special because I have some vectors based on this file's coordinate system. I want to draw these vectors and the basis vector of that system onto the pdb. Eventually I would…
1
vote
2 answers

Install and Import MDAnalysis on Google Colaboratory for Python? Problems

I'm trying to install and import MDAnalysis and MDAnalysisTests libraries on Google Colaboratory, I've tried three ways but nothing works: Using default: !pip install library !pip install MDAnalysis But I get: Collecting MDAnalysis Using cached…
1
2 3