Hi everyone,
I was trying to select molecules within a particular layer (z<2.3 and z>2.6)and write the coordinates to a .pdb file using this code:
import MDAnalysis
from MDAnalysis.tests.datafiles import PDB, XTC
pdb_path= '/Users/macuser/desktop/Python/1ns_4sig.pdb'
xtc_path= '/Users/macuser/desktop/Python/1ns_4sig.xtc'
u = MDAnalysis.Universe(pdb_path, xtc_path)
group = u.select_atoms("resname SOL and resname HSS and prop z<2.3 and prop z> 2.6")
with MDAnalysis.Writer("SOL_HSS.xtc", protein.n_atoms) as W:
for ts in u.trajectory:
W.write(group)
I got this error " raise ImportError("Package MDAnalysisTests required!")"
"ImportError: Package MDAnalysisTests required!"
I am very new to MDAnalysis. Please help me.
Thanks.
Sakiru.
--
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-discussion+unsub...@googlegroups.com.
To post to this group, send email to mdnalysis-discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/mdnalysis-discussion.
For more options, visit https://groups.google.com/d/optout.
from MDAnalysis.tests.datafiles import PDB, XTC
> To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discussion+unsub...@googlegroups.com.