Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for RNA Analysis #44

Open
Ompal12 opened this issue Jan 6, 2021 · 2 comments
Open

for RNA Analysis #44

Ompal12 opened this issue Jan 6, 2021 · 2 comments

Comments

@Ompal12
Copy link

Ompal12 commented Jan 6, 2021

Here i am using below code for calculation of ermsd of RNA system by using gromacs trajectry file. And i got an error like Error...
Can anyone help me regarding this?

Thank you

`import barnaba as bb
import mdtraj as md

define trajectory and topology files

native="md.pdb"
traj = "md.xtc"
top = "md.pdb"

calculate eRMSD between native and all frames in trajectory

ermsd = bb.ermsd(native,traj,topology=top)

import matplotlib.pyplot as plt
plt.xlabel("Frame")
plt.ylabel("eRMSD from native")
plt.plot(ermsd[::50])
plt.show()

plt.hist(ermsd,density=True,bins=50)
plt.xlabel("eRMSD from native")
plt.show()`

Error-
MemoryError Traceback (most recent call last)
in ()
7
8 # calculate eRMSD between native and all frames in trajectory
----> 9 ermsd = bb.ermsd(native,traj,topology=top)
10
11 import matplotlib.pyplot as plt

/home/workstation/anaconda3/lib/python3.5/site-packages/barnaba/functions.py in ermsd(reference, target, cutoff, topology, residues_ref, residues_target)
56 traj = md.load(target)
57 else:
---> 58 traj = md.load(target,top=topology)
59
60 warn += "# Loaded target %s \n" % target

/home/workstation/anaconda3/lib/python3.5/site-packages/mdtraj/core/trajectory.py in load(filename_or_filenames, discard_overlapping_frames, **kwargs)
428 _assert_files_or_dirs_exist(filename_or_filenames)
429
--> 430 value = loader(filename, **kwargs)
431 return value
432

mdtraj/formats/xtc/xtc.pyx in xtc.load_xtc (mdtraj/formats/xtc/xtc.c:2766)()

mdtraj/formats/xtc/xtc.pyx in xtc.load_xtc (mdtraj/formats/xtc/xtc.c:2720)()

mdtraj/formats/xtc/xtc.pyx in xtc.XTCTrajectoryFile.read_as_traj (mdtraj/formats/xtc/xtc.c:4579)()

mdtraj/formats/xtc/xtc.pyx in xtc.XTCTrajectoryFile.read (mdtraj/formats/xtc/xtc.c:6037)()

MemoryError:

@giopina
Copy link
Contributor

giopina commented Jan 6, 2021

Hi,
It looks like the error comes from mdtraj when loading the xtc trajectory.
(you should get the same error if you load the xtc directly with mdtraj.load_xtc(traj,topology=top). you can double check that)
Maybe your trajectory is just very big and you run out of memory?
If this is the case, I'd say you can either try to downsample your traj or split it into smaller chuncks, compute the ermsd for each and then concatenate them back together.

@Ompal12
Copy link
Author

Ompal12 commented Jan 8, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants