Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
core::io::raw_data::DisulfideFile Class Reference

Parses and stores a disulfide file. More...

#include <DisulfideFile.hh>

Classes

struct  ResNum
 represents a residue of either pdb or 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 Types

enum  NumberingSystem { pdb_num, rosetta_num, unknown_num }
 distinguish between PDB numbering and internal Rosetta numbering 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_
 

Detailed Description

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.

File Format

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?

Member Enumeration Documentation

distinguish between PDB numbering and internal Rosetta numbering

unknown_num should be avoided, as one of the other types can generally be infered from the existance of a chain specifier.

Enumerator
pdb_num 
rosetta_num 
unknown_num 

Constructor & Destructor Documentation

core::io::raw_data::DisulfideFile::DisulfideFile ( std::string  filename)
inline

Member Function Documentation

void core::io::raw_data::DisulfideFile::disulfides ( utility::vector1< std::pair< core::Size, core::Size > > &  disulfides) const
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)

std::string const& core::io::raw_data::DisulfideFile::filename ( ) const
inline

Accessor for the filename.

References filename_.

void core::io::raw_data::DisulfideFile::parse_disulf_file ( ) const
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

Parameters
[out]disulfidesAppends pairs of residues specified by the file to this list
[in]poseis used if PDB numbering is used in the disulfide file and is also needed to manually set the disulfides in the conformation

For each pair of residues (l,u) in this list, l<u

References core::pose::Pose::conformation(), and core::conformation::Conformation::fix_disulfides().

Size core::io::raw_data::DisulfideFile::resnum_to_rosetta_num ( core::pose::Pose const &  pose,
ResNum const &  resnum 
) const
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.

Member Data Documentation

utility::vector1< std::pair<ResNum,ResNum> > core::io::raw_data::DisulfideFile::disulfides_
mutableprivate
const std::string core::io::raw_data::DisulfideFile::filename_
private

Referenced by filename().

bool core::io::raw_data::DisulfideFile::up_to_date_
mutableprivate

The documentation for this class was generated from the following files: