Ligand atom selection around a particular distance around protein atoms

63 views
Skip to first unread message

akashp...@gmail.com

unread,
Jun 18, 2021, 7:05:40 AM6/18/21
to MDnalysis discussion
Hi all,

I wanted to calculate the number of ligand N atoms around 6A of  protein heavy atoms as a function of simulation time (frame). Here is the code I have so far:

import MDAnalysis as mda
u = mda.Universe(top, traj)
protein = u.select_atoms("index 0:6614 and not name H*")
protein
<AtomGroup with 3336 atoms>
lig = u.select_atoms("index 6615:8154 and name N")
lig
<AtomGroup with 154 atoms>
for ts in u.trajectory:
      lig_6A = ("lig around 6 protein")

I get an error saying MDAnalysis does not recognise 'around' and that 'AtomGroup' object is not callable. Please advise  me on how I can extract the number of N atoms (ligand) around 6 of protein heavy atoms as function of time?

Best wishes,

Akash
Reply all
Reply to author
Forward
0 new messages