def __init__(self, S): """Create a Trajectory from a single conformation. Leaves the XYZList key as an empty list for easy appending. Parameters ---------- S: Conformation The single conformation to build a trajectory from Notes ----- You probably want to use something else to load trajectories See Also -------- load_from_pdb load_from_hdf load_from_lhdf """ ConformationBaseClass.__init__(self, S) self["XYZList"] = [] if "XYZList" in S: self["XYZList"] = S["XYZList"].copy()
def restrict_atom_indices(self, AtomIndices): ConformationBaseClass.restrict_atom_indices(self, AtomIndices) self['XYZList'] = copy.copy(self['XYZList'][:, AtomIndices])