Rosetta
|
Parses and stores a disulfide file. More...
#include <DisulfideFile.hh>
Classes | |
struct | ResNum |
represents a residue of either pdb or rosetta numbering. More... | |
Public Types | |
enum | NumberingSystem { pdb_num , rosetta_num , unknown_num } |
distinguish between PDB numbering and internal Rosetta numbering More... | |
Public Member Functions | |
DisulfideFile (std::string filename) | |
std::string const & | filename () const |
Accessor for the filename. More... | |
void | disulfides (utility::vector1< std::pair< core::Size, core::Size > > &disulfides) const |
Get a list of disulfide bonds declared in the file. More... | |
void | disulfides (utility::vector1< std::pair< core::Size, core::Size > > &disulfides, core::pose::Pose const &pose) const |
Get a list of disulfide bonds declared in the file (renumbered to rosetta numbering if necessary) More... | |
void | read_in_and_set_disulfides (core::pose::Pose &pose) |
Get a list of disulfide bonds declared in the file (renumbered to rosetta numbering if necessary) also manually set the disulfides in the conformation of the provided pose (this is a necessary workaround for dealing with multiple disulfide specification files in PyRosetta. More... | |
Private Member Functions | |
void | parse_disulf_file () const |
helper function to read in the file More... | |
core::Size | resnum_to_rosetta_num (core::pose::Pose const &pose, ResNum const &resnum) const |
convert a ResNum struct into a normal rosetta residue num More... | |
Private Attributes | |
const std::string | filename_ |
bool | up_to_date_ |
utility::vector1< std::pair< ResNum, ResNum > > | disulfides_ |
Parses and stores a disulfide file.
Initiallizing a DisulfideFile is a lightweight operation. The heavy lifting occurs the first time disulfides() is called. This parses the file and caches the resulting pairs of residues. Subsequent calls to disulfides() are fast since they don't reparse the file but merely reinterpret the results in terms of the specified.
The disulfide file format is pretty flexible. It looks for three kinds of lines:
All lines not matching these criteria are silently ignored. This implies that whole pdb files can usually be used unaltered as disulfide files, since the SSBOND entries are extracted and all else is ignored.
Question from rhiju, 2014 – I don't see handling of '12A' or SSBOND cases in DisulfideFile.cc – is someone going to check that in?
|
inline |
void core::io::raw_data::DisulfideFile::disulfides | ( | utility::vector1< std::pair< core::Size, core::Size > > & | disulfides | ) | const |
Get a list of disulfide bonds declared in the file.
Referenced by protocols::frag_picker::CS2ndShift::also_check_fix_disulf(), protocols::topology_broker::TopologyBroker::apply(), protocols::relax::loop::LoopRelaxMover::apply(), protocols::abinitio::AbrelaxApplication::do_distributed_rerun(), protocols::abinitio::AbrelaxApplication::generate_extended_pose(), core::pose::initialize_disulfide_bonds(), protocols::frag_picker::scores::MakeDisulfideDistance::make(), protocols::stepwise::legacy::modeler::protein::StepWiseProteinPoseSetup::setup_disulfides(), protocols::abinitio::AbrelaxApplication::setup_fold(), and protocols::topology_broker::TopologyBroker::switch_to_fullatom().
void core::io::raw_data::DisulfideFile::disulfides | ( | utility::vector1< std::pair< core::Size, core::Size > > & | disulfides, |
core::pose::Pose const & | pose | ||
) | const |
Get a list of disulfide bonds declared in the file (renumbered to rosetta numbering if necessary)
|
inline |
Accessor for the filename.
References filename_.
|
private |
helper function to read in the file
Parses residue numbers out of a disulfide file See DisulfideFile for more details on the file format.
References core::io::raw_data::TR(), protocols::hybridization::u, and core::scoring::methods::ws.
void core::io::raw_data::DisulfideFile::read_in_and_set_disulfides | ( | core::pose::Pose & | pose | ) |
Get a list of disulfide bonds declared in the file (renumbered to rosetta numbering if necessary) also manually set the disulfides in the conformation of the provided pose (this is a necessary workaround for dealing with multiple disulfide specification files in PyRosetta.
Get a list of disulfide bonds declared in the file and manually set them in the conformation.
The first time this is called it reads the file and caches the resulting pairs of residues. Subsequent calls to disulfides() are fast since they don't reparse the file but merely reinterpret the results in terms of the specified. (this is a necessary workaround for dealing with multiple disulfide specification files in PyRosetta) Because there is no equivalent of std::pair in python this method avoids needing to provide a vector1 of std::pairs as arguments
[out] | disulfides | Appends pairs of residues specified by the file to this list |
[in] | pose | is used if PDB numbering is used in the disulfide file and is also needed to manually set the disulfides in the conformation |
@postcondition For each pair of residues (l,u) in this list, l<u
References core::pose::Pose::conformation(), core::conformation::Conformation::fix_disulfides(), and protocols::hybridization::u.
|
private |
convert a ResNum struct into a normal rosetta residue num
Convert a ResNum object into the rosetta residue index.
For ResNums with the rosetta_num type, this just return the n field. For pdb_num ResNums the pose's PDBInfo is used to translate to rosetta numbering.
This function exits with an error message if it is unable to do the conversion.
References core::io::raw_data::DisulfideFile::ResNum::chain, core::io::raw_data::DisulfideFile::ResNum::n, core::pose::Pose::pdb_info(), core::io::raw_data::TR(), and core::io::raw_data::DisulfideFile::ResNum::type.
|
mutableprivate |
|
private |
Referenced by filename().
|
mutableprivate |