stacker.file_manipulation.filter_traj_to_pdb#
- filter_traj_to_pdb(trj_file, top_file, pdb, residues={}, atoms={})[source]#
Filters an input trajectory to only the specified atoms and residues and outputs to pdb
Filteres an input trajectory that contains all of the atoms in a trajectory to only the desired atoms at the desired residues (eg. the atoms necessary to find the center of geometry of a residue) and writes the output to a specified pdb file. If residues or atomnames are empty, all residues or atoms are included respectively.
- Parameters:
- trj_filestr
path to file of the concatenated trajectory. Should be resampled to the 1 in 50 frames sampled trajectories for each replicate.
- top_filestr
path to file of the topology of the molecule
- pdbstr
path to the output pdb file
- residuesset or str
1-indexed residue numbers of residues to keep in the trajectory. Accepts smart-indexed str representing a list of residues (e.g ‘1-5,6,39-48’) If Empty, include all residues.
- atomnamesset
atomnames to keep in the trajectory
- Returns:
- None
See also
filter_traj
Filters an input trajectory to only the specified atoms and residues
Notes
Inputed trajectory should have 1-indexed Residue Indices, Outputed trajectory object will be 0-indexed.