You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For instance if I want to fit on the CA only (but compute the RMSD for all heavy atoms I would like to do:
u=mda.Universe(topol, structure)
u.add_TopologyAttr("tempfactors")
u.add_TopologyAttr("occupancies")
# calculate RMSD for all heavy atomsprotein_heavy=u.select_atoms("protein and not name H*")
protein_heavy.tempfactors=1.0# RMSD fit on C-alphasca=protein_heavy.select_atoms("name CA")
ca.occupancies=1.0# write file ONLY with atoms of interest (instead of everything with lots# of zeros in the tempfactors and occupancies)protein_heavy.write("reference.pdb", keep_serials=True)
The output file will only contain the protein heavy atoms but not the hydrogens (and the rest of the system). The heavy atoms should have the same serial number as in the topology.
Actual behaviour
The serial number in the sub selection always starts at 1 and is incremented sequentially.
Currently version of MDAnalysis:
0.18.1-dev
The text was updated successfully, but these errors were encountered:
Expected behaviour
For some applications, namely rmsd calculation in PLUMED2, one needs to provide a PDB file with the original ATOM serial numbers. The MDAnalysis PDBWriter should have a kwarg
keep_serials
(or similar) to keep the ATOM serial numbers from the topology when a subselection is written.For instance if I want to fit on the CA only (but compute the RMSD for all heavy atoms I would like to do:
The output file will only contain the protein heavy atoms but not the hydrogens (and the rest of the system). The heavy atoms should have the same serial number as in the topology.
Actual behaviour
The serial number in the sub selection always starts at 1 and is incremented sequentially.
Currently version of MDAnalysis:
0.18.1-dev
The text was updated successfully, but these errors were encountered: