--
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/e806f829-d061-45cf-9079-dadc1e4f19cdn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/2240a991-9d42-010d-4b9c-5a87ed51b3a0%40gmail.com.
uni = {'AN': u, 'APP' : u1 , 'PPI' : u2, 'PPA': u3, 'AO': u4}
df_collection = []
for key, value in uni.items():
protein = value.select_atoms("protein")prealigner = align.AlignTraj(value, value, select="protein and name CA",
in_memory=False).run()
# ref = average structure
ref_coordinates = value.trajectory.timeseries(asel=protein).mean(axis=1)
# Make a reference structure (need to reshape into a1-frame "trajectory").
ref = mda.Merge(protein).load_new(ref_coordinates[:, None, :],
order="afc")
aligner = align.AlignTraj(u, ref,
select='protein and name CA',
filename='aligned_traj.dcd',
in_memory=False).run()
u = mda.Universe('5uls-anp/prep/namd/step3_charmm2namd.psf', 'aligned_traj.dcd')
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/CA%2Bd5Gms6Kzawer-mB9_ai1x0o%3DmKwu8Rq0VKsYu58_tnAgeUzA%40mail.gmail.com.
On Apr 16, 2021, at 1:09 PM, Alao, John-Paul <ala...@miamioh.edu> wrote:
uni = {'AN': u, 'APP' : u1 , 'PPI' : u2, 'PPA': u3, 'AO': u4}
df_collection = []
for key, value in uni.items():
protein = value.select_atoms("protein")
prealigner = align.AlignTraj(value, value, select="protein and name CA",
in_memory=False).run()
# ref = average structure
ref_coordinates = value.trajectory.timeseries(asel=protein).mean(axis=1)
# Make a reference structure (need to reshape into a1-frame "trajectory").
ref = mda.Merge(protein).load_new(ref_coordinates[:, None, :],
order="afc")
#Align to ref using in memory=True
# aligner = align.AlignTraj(value, ref,
# select='protein and name CA',
# in_memory=True).run()
## Align without using in memory
aligner = align.AlignTraj(u, ref,
select='protein and name CA',
filename='aligned_traj.dcd',
in_memory=False).run()
u = mda.Universe('5uls-anp/prep/namd/step3_charmm2namd.psf', 'aligned_traj.dcd')
c_alphas = value.select_atoms('protein and name CA')
R = rms.RMSF(c_alphas).run()
df=pd.DataFrame(c_alphas.resids)
df['rmsf'] = R.rmsf
df_collection.append(df)
c_alphas.atoms.write('CA_{0}.pdb'.format(key))This is the full code and the bolded and underlined part is what gave the error OSError: DCD file does not exist.
Using in_memory=True gave the error MemoryError: Unable to allocate 6.38 GiB for an array with shape (285542, 2000, 3) and data type float32 after the second loop iteration.
Thank you in advance.On Fri, Apr 16, 2021 at 1:39 PM Tamas Hegedus <biohe...@gmail.com> wrote:I have the feeling that your code is incomplete and can not be understood.
Please provide it with the full code including the loop. It is also good to indicate, which line throw the OSError.
On 4/16/21 4:51 PM, John-Paul Alao wrote:
Hi, I'm looping through different trajectories, after like 2 loops, my memory is full so I had to consider using "in_memory=False" instead of "in_memory=True". However, i got the error message OSError: DCD file does not exist--
My code is below, Please how do resolve this? Or is there an efficient way to clear the memory after each loop?
aligner = align.AlignTraj(u, ref,select='protein and name CA',filename='aligned_traj.dcd',in_memory=False).run()value = mda.Universe('protein.psf', 'aligned_traj.dcd')
Thanks.
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/e806f829-d061-45cf-9079-dadc1e4f19cdn%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/2240a991-9d42-010d-4b9c-5a87ed51b3a0%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-discussion/CA%2Bd5Gms6Kzawer-mB9_ai1x0o%3DmKwu8Rq0VKsYu58_tnAgeUzA%40mail.gmail.com.