![]() |
Rosetta
2021.07
|
#include <MolecularSurfaceCalculator.hh>
Public Types | |
typedef float | ScValue |
typedef numeric::xyzVector< float > | Vec3 |
Public Member Functions | |
MolecularSurfaceCalculator () | |
MolecularSurfaceCalculator constructor, initializes default settings. More... | |
~MolecularSurfaceCalculator () override | |
virtual int | Init () |
Initializes calculation and GPU (if used) Init() is also called implicitly by the static CalcSc() function. More... | |
void | Reset () |
Reset calculator for another calculation. Must be used when the MolecularSurfaceCalculator instance is re-used. More... | |
int | AddAtom (int molecule, Atom &atom) |
Add an atom to a molecule for computation. More... | |
core::Size | AddResidue (int molecule, core::conformation::Residue const &residue, bool apolar_only=false) |
Add a rosetta residue to a specific molecule. More... | |
virtual int | Calc (core::pose::Pose const &pose, core::Size jump_id=0) |
Generate molecular surfaces for the given pose. //. More... | |
virtual int | Calc () |
Generate molecular surfaces for loaded atoms. //. More... | |
std::vector< Atom > const & | GetAtoms () |
std::vector< DOT > const & | GetDots (int const moleculeid) |
std::vector< const DOT * > const & | GetTrimmedDots (int const moleculeid) |
RESULTS const & | GetResults () |
Public Attributes | |
struct { | |
core::Real rp | |
core::Real density | |
core::Real band | |
core::Real sep | |
core::Real weight | |
core::Real binwidth_dist | |
core::Real binwidth_norm | |
core::Real near_squared_size | |
} | settings |
Protected Member Functions | |
void | GenerateMolecularSurfaces () |
Generate untrimmed surfaces for the defined molecules. More... | |
int | AssignAtomRadius (Atom &atom) |
int | WildcardMatch (char const *query, char const *pattern, int const l) |
int | ReadScRadii () |
Read atom radius definitions from file This function is implicitly called, but can be overloaded or called explicitly for custom handling of the atom radii library. Returns true on success. More... | |
void | AddDot (int const molecule, int const type, Vec3 const &coor, ScValue const area, Vec3 const &pcen, Atom const &atom) |
virtual int | AssignAttentionNumbers (std::vector< Atom > &atom) |
Protected Attributes | |
struct { | |
ScValue radmax | |
RESULTS results | |
std::vector< Atom > atoms | |
std::vector< DOT > dots [2] | |
std::vector< const DOT * > trimmed_dots [2] | |
std::vector< PROBE > probes | |
Vec3 prevp | |
int prevburied | |
} | run_ |
Static Protected Attributes | |
static std::vector< ATOM_RADIUS > | radii_ |
Private Member Functions | |
int | CalcDotsForAllAtoms (std::vector< Atom > &atoms) |
int | CalcDotsForAtoms (std::vector< Atom > &atoms) |
int | FindNeighbordsAndBuriedAtoms (Atom &atom) |
int | FindNeighborsForAtom (Atom &atom1) |
int | GenerateToroidalSurface (Atom &atom1, Atom &atom2, Vec3 const &uij, Vec3 const &tij, ScValue rij, int between) |
int | GenerateConvexSurface (Atom const &atom1) |
int | GenerateConcaveSurface () |
int | SecondLoop (Atom &pAtom1) |
int | ThirdLoop (Atom &pAtom1, Atom &pAtom, Vec3 const &uij, Vec3 const &tij, ScValue const rij) |
int | CheckAtomCollision2 (Vec3 const &pijk, Atom const &atom1, Atom const &atom2, std::vector< Atom * > const &atoms) |
int | CheckPointCollision (Vec3 const &pcen, std::vector< Atom * > const &atoms) |
int | CheckProbeCollision (Vec3 const &point, std::vector< const PROBE * > const &nears, ScValue const r2) |
ScValue | DistancePointToLine (Vec3 const &cen, Vec3 const &axis, Vec3 const &pnt) |
ScValue | SubArc (Vec3 const &cen, ScValue const rad, Vec3 const &axis, ScValue const density, Vec3 const &x, Vec3 const &v, std::vector< Vec3 > &points) |
ScValue | SubDiv (Vec3 const &cen, ScValue const rad, Vec3 const &x, Vec3 const &y, ScValue angle, ScValue density, std::vector< Vec3 > &points) |
ScValue | SubCir (Vec3 const &cen, ScValue const rad, Vec3 const &north, ScValue const density, std::vector< Vec3 > &points) |
typedef float core::scoring::sc::MolecularSurfaceCalculator::ScValue |
typedef numeric::xyzVector< float > core::scoring::sc::MolecularSurfaceCalculator::Vec3 |
core::scoring::sc::MolecularSurfaceCalculator::MolecularSurfaceCalculator | ( | ) |
MolecularSurfaceCalculator constructor, initializes default settings.
|
override |
References Reset().
int core::scoring::sc::MolecularSurfaceCalculator::AddAtom | ( | int | molecule, |
Atom & | atom | ||
) |
Add an atom to a molecule for computation.
Add an core::scoring::sc::Atom to the molecule. Normally this is called by AddResidue(). Explicit addition of atoms via this function is rarely needed. This function also looks-up the atom radius and density. Returns true on success.
References core::scoring::sc::Atom::access, core::scoring::sc::Atom::atom, core::scoring::sc::Atom::density, core::scoring::sc::Atom::molecule, core::scoring::sc::Atom::natom, core::scoring::sc::Atom::radius, core::scoring::sc::Atom::residue, and core::scoring::TR().
Referenced by AddResidue().
|
protected |
References core::scoring::sc::_DOT::buried, core::scoring::sc::Atom::buried, core::scoring::sc::_DOT::outnml, run_, and settings.
Referenced by GenerateConcaveSurface(), GenerateConvexSurface(), and GenerateToroidalSurface().
core::Size core::scoring::sc::MolecularSurfaceCalculator::AddResidue | ( | int | molecule, |
core::conformation::Residue const & | residue, | ||
bool | apolar_only = false |
||
) |
Add a rosetta residue to a specific molecule.
Call this function when explicitly defining which residues belong to which the molecular surface. If partitioning by jump_id is sufficient for your application, you may use the Calc() or CalcSc() functions instead. Returns number of atoms added for the specified residue.
Example: core::scoring::sc::MolecularSurfaceCalculator calc; core::Real sc; calc.Init(); calc.Reset(); // Only needed when re-using the calculator for(core::Size i = 1; i <= pose.size(); i++) calc.AddResidue((i < 100), pose.residue(i)); if(calc.Calc()) sc = calc.GetResults().sc;
References AddAtom(), AssignAtomRadius(), core::scoring::sc::Atom::atom, core::conformation::Residue::atom_name(), core::conformation::Residue::atom_type(), Init(), core::chemical::AtomType::is_acceptor(), core::chemical::AtomType::is_donor(), core::chemical::ResidueType::is_metal(), core::conformation::Residue::is_virtual(), core::conformation::Residue::name3(), core::conformation::Residue::nheavyatoms(), core::scoring::sc::Atom::nresidue, core::scoring::sc::Atom::radius, core::scoring::sc::Atom::residue, core::conformation::Residue::seqpos(), core::scoring::TR(), core::conformation::Residue::type(), protocols::kinmatch::xyz(), and core::conformation::Residue::xyz().
Referenced by core::scoring::sc::ElectrostaticComplementarityCalculator::AddResidue(), Calc(), protocols::analysis::InterfaceAnalyzerMover::compute_interface_sc(), protocols::simple_filters::ContactMolecularSurfaceFilter::setup_from_selectors(), protocols::simple_filters::ShapeComplementarityFilter::setup_from_selectors(), protocols::simple_filters::ShapeComplementarityFilter::setup_multi_component_symm(), and protocols::simple_filters::ShapeComplementarityFilter::setup_single_component_symm().
|
protected |
References core::scoring::sc::Atom::atom, radii_, core::scoring::sc::Atom::radius, core::scoring::sc::Atom::residue, core::scoring::TR(), and WildcardMatch().
Referenced by AddResidue().
|
protectedvirtual |
Reimplemented in core::scoring::sc::ShapeComplementarityCalculator, and core::scoring::sc::ContactMolecularSurfaceCalculator.
References core::scoring::sc::ATTEN_BURIED_FLAGGED, and run_.
Referenced by Calc().
|
virtual |
Generate molecular surfaces for the given pose. //.
Generate molecular surfaces for the given pose.
This function initializes the calculator, adds all residues in the given pose, and generates molecular surfaces.
The pose is partitioned into separate molecules across the given jump. If the given jump is 0, the entire pose is loaded as molecule 1. To control what residues make up either surface, use the AddResidue() or even AddAtom() function instead. Returns true on success. Results are retrieved with GetResults().
Example: core::scoring::sc::MolecularSurfaceCalculator calc; if(calc.Calc( pose )) ... = calc.GetResults();
Reimplemented in core::scoring::sc::ShapeComplementarityCalculator.
References AddResidue(), Calc(), core::pose::Pose::fold_tree(), Init(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueTypeBase::name(), core::pose::Pose::num_jump(), core::kinematics::FoldTree::partition_by_jump(), core::pose::Pose::residue(), core::pose::Pose::size(), core::scoring::TR(), and core::conformation::Residue::type().
|
virtual |
Generate molecular surfaces for loaded atoms. //.
Generate molecular surfaces for loaded atoms.
This function generates molecular surfaces for atoms added via AddAtom and AddResidue.
Init() must be called before this function. Returns true on success.
Reimplemented in core::scoring::sc::ShapeComplementarityCalculator.
References AssignAttentionNumbers(), core::scoring::sc::ShapeComplementarityCalculatorException::error, GenerateMolecularSurfaces(), run_, and core::scoring::TR().
Referenced by core::scoring::sc::ShapeComplementarityCalculator::Calc(), and Calc().
|
private |
References core::scoring::sc::Atom::access, core::scoring::sc::Atom::atten, core::scoring::sc::ATTEN_6, core::scoring::sc::ATTEN_BLOCKER, core::scoring::sc::Atom::buried, FindNeighbordsAndBuriedAtoms(), GenerateConcaveSurface(), GenerateConvexSurface(), run_, and settings.
Referenced by GenerateMolecularSurfaces().
|
private |
|
private |
References core::scoring::sc::Atom::radius, and settings.
Referenced by ThirdLoop().
|
private |
References settings.
Referenced by GenerateConvexSurface().
|
private |
References protocols::hybridization::r2.
Referenced by GenerateConcaveSurface().
|
private |
Referenced by GenerateToroidalSurface().
|
private |
References FindNeighborsForAtom(), core::scoring::sc::Atom::neighbors, and SecondLoop().
Referenced by CalcDotsForAllAtoms().
|
private |
References core::scoring::sc::Atom::access, core::scoring::sc::Atom::atom, core::scoring::sc::Atom::atten, core::scoring::sc::ATTEN_6, core::scoring::sc::ATTEN_BURIED_FLAGGED, core::scoring::sc::Atom::buried, core::scoring::sc::Atom::molecule, core::scoring::sc::Atom::natom, core::scoring::sc::Atom::neighbors, core::scoring::sc::Atom::radius, core::scoring::sc::Atom::residue, run_, and settings.
Referenced by FindNeighbordsAndBuriedAtoms().
|
private |
References AddDot(), core::scoring::sc::ATTEN_6, CheckProbeCollision(), density, run_, settings, SubArc(), and SubCir().
Referenced by CalcDotsForAllAtoms().
|
private |
|
protected |
Generate untrimmed surfaces for the defined molecules.
This function should be called within a try/catch block for ShapeComplementarityCalculatorException. Raises exception on error.
References CalcDotsForAllAtoms(), run_, settings, and core::scoring::TR().
Referenced by core::scoring::sc::ShapeComplementarityCalculator::Calc(), Calc(), and core::scoring::sc::ContactMolecularSurfaceCalculator::CalcContactArea().
|
private |
References core::scoring::sc::Atom::access, AddDot(), core::scoring::sc::Atom::atten, core::scoring::sc::ATTEN_2, core::scoring::sc::ATTEN_6, core::scoring::sc::Atom::buried, core::scoring::sc::Atom::density, density, DistancePointToLine(), core::scoring::sc::Atom::molecule, core::scoring::sc::Atom::neighbors, core::scoring::sc::Atom::radius, run_, settings, SubArc(), and SubCir().
Referenced by SecondLoop().
|
inline |
References run_.
|
inline |
References run_.
|
inline |
|
inline |
References run_.
Referenced by core::scoring::sc::ElectrostaticComplementarityCalculator::Calc().
|
virtual |
Initializes calculation and GPU (if used) Init() is also called implicitly by the static CalcSc() function.
References radii_, and ReadScRadii().
Referenced by AddResidue(), protocols::docking::membrane::MPFindInterfaceMover::apply(), Calc(), protocols::simple_filters::ContactMolecularSurfaceFilter::compute(), protocols::simple_filters::ShapeComplementarityFilter::compute(), protocols::pockets::PocketGrid::get_connolly_surfacePoints(), and core::scoring::sc::ElectrostaticComplementarityCalculator::Init().
|
protected |
Read atom radius definitions from file This function is implicitly called, but can be overloaded or called explicitly for custom handling of the atom radii library. Returns true on success.
References core::scoring::sc::_ATOM_RADIUS::atom, core::conformation::membrane::in, radii_, core::scoring::sc::_ATOM_RADIUS::radius, core::scoring::sc::_ATOM_RADIUS::residue, and core::scoring::TR().
Referenced by Init().
void core::scoring::sc::MolecularSurfaceCalculator::Reset | ( | ) |
Reset calculator for another calculation. Must be used when the MolecularSurfaceCalculator instance is re-used.
Atom, probe and surface dot vectors are reset here. We don't clear them after the calculation is finished in case the caller would like to use those data elsewhere.
References core::pose::motif::a(), and run_.
Referenced by protocols::simple_filters::ContactMolecularSurfaceFilter::compute(), protocols::simple_filters::ShapeComplementarityFilter::compute(), MolecularSurfaceCalculator(), core::scoring::sc::ElectrostaticComplementarityCalculator::Reset(), and ~MolecularSurfaceCalculator().
|
private |
|
private |
Referenced by GenerateConcaveSurface(), GenerateConvexSurface(), and GenerateToroidalSurface().
|
private |
References ABS, PI, and SubDiv().
Referenced by GenerateConcaveSurface(), GenerateConvexSurface(), and GenerateToroidalSurface().
|
private |
References core::pose::motif::a(), core::pack::dunbrack::c, and MAX_SUBDIV.
|
private |
References core::scoring::sc::Atom::access, core::scoring::sc::_PROBE::alt, core::scoring::sc::Atom::atten, core::scoring::sc::ATTEN_BLOCKER, CheckAtomCollision2(), core::scoring::sc::_PROBE::height, core::scoring::sc::Atom::neighbors, core::scoring::sc::_PROBE::pAtoms, core::scoring::sc::_PROBE::point, core::scoring::sc::Atom::radius, run_, and settings.
Referenced by SecondLoop().
|
protected |
Referenced by AssignAtomRadius().
std::vector<Atom> core::scoring::sc::MolecularSurfaceCalculator::atoms |
core::Real core::scoring::sc::MolecularSurfaceCalculator::band |
core::Real core::scoring::sc::MolecularSurfaceCalculator::binwidth_dist |
core::Real core::scoring::sc::MolecularSurfaceCalculator::binwidth_norm |
core::Real core::scoring::sc::MolecularSurfaceCalculator::density |
Referenced by core::scoring::sc::ShapeComplementarityCalculator::CalcSc(), protocols::simple_filters::ContactMolecularSurfaceFilter::compute(), protocols::simple_filters::ShapeComplementarityFilter::compute(), GenerateConcaveSurface(), GenerateToroidalSurface(), and protocols::hotspot_hashing::SurfaceSearchPattern::SurfaceSearchPattern().
std::vector<DOT> core::scoring::sc::MolecularSurfaceCalculator::dots[2] |
core::Real core::scoring::sc::MolecularSurfaceCalculator::near_squared_size |
int core::scoring::sc::MolecularSurfaceCalculator::prevburied |
Vec3 core::scoring::sc::MolecularSurfaceCalculator::prevp |
std::vector<PROBE> core::scoring::sc::MolecularSurfaceCalculator::probes |
|
staticprotected |
Referenced by AssignAtomRadius(), Init(), and ReadScRadii().
ScValue core::scoring::sc::MolecularSurfaceCalculator::radmax |
RESULTS core::scoring::sc::MolecularSurfaceCalculator::results |
core::Real core::scoring::sc::MolecularSurfaceCalculator::rp |
struct { ... } core::scoring::sc::MolecularSurfaceCalculator::run_ |
Referenced by AddDot(), core::scoring::sc::ContactMolecularSurfaceCalculator::AssignAttentionNumbers(), core::scoring::sc::ShapeComplementarityCalculator::AssignAttentionNumbers(), AssignAttentionNumbers(), core::scoring::sc::ShapeComplementarityCalculator::Calc(), Calc(), core::scoring::sc::ContactMolecularSurfaceCalculator::CalcContactArea(), CalcDotsForAllAtoms(), core::scoring::sc::ShapeComplementarityCalculator::CalcNeighborDistance(), FindNeighborsForAtom(), GenerateConcaveSurface(), GenerateConvexSurface(), GenerateMolecularSurfaces(), GenerateToroidalSurface(), GetAtoms(), GetDots(), GetResults(), GetTrimmedDots(), Reset(), and ThirdLoop().
core::Real core::scoring::sc::MolecularSurfaceCalculator::sep |
struct { ... } core::scoring::sc::MolecularSurfaceCalculator::settings |
Referenced by AddDot(), core::scoring::sc::ContactMolecularSurfaceCalculator::AssignAttentionNumbers(), core::scoring::sc::ShapeComplementarityCalculator::AssignAttentionNumbers(), core::scoring::sc::ShapeComplementarityCalculator::Calc(), core::scoring::sc::ElectrostaticComplementarityCalculator::Calc(), core::scoring::sc::ContactMolecularSurfaceCalculator::CalcContactMolecularSurface(), CalcDotsForAllAtoms(), core::scoring::sc::ShapeComplementarityCalculator::CalcNeighborDistance(), core::scoring::sc::ShapeComplementarityCalculator::CalcSc(), CheckAtomCollision2(), CheckPointCollision(), protocols::simple_filters::ContactMolecularSurfaceFilter::compute(), protocols::simple_filters::ShapeComplementarityFilter::compute(), FindNeighborsForAtom(), GenerateConcaveSurface(), GenerateConvexSurface(), GenerateMolecularSurfaces(), GenerateToroidalSurface(), MolecularSurfaceCalculator(), SecondLoop(), protocols::hotspot_hashing::SurfaceSearchPattern::SurfaceSearchPattern(), ThirdLoop(), core::scoring::sc::ShapeComplementarityCalculator::TrimPeripheralBand(), and core::scoring::sc::ShapeComplementarityCalculator::TrimPeripheralBandCheckDot().
std::vector<const DOT*> core::scoring::sc::MolecularSurfaceCalculator::trimmed_dots[2] |
core::Real core::scoring::sc::MolecularSurfaceCalculator::weight |