Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
core::scoring::sc::MolecularSurfaceCalculator Class Reference

#include <MolecularSurfaceCalculator.hh>

Inheritance diagram for core::scoring::sc::MolecularSurfaceCalculator:
Inheritance graph
[legend]

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)
 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
 
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_RADIUSradii_
 

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)
 

Member Typedef Documentation

typedef numeric::xyzVector< float > core::scoring::sc::MolecularSurfaceCalculator::Vec3

Constructor & Destructor Documentation

core::scoring::sc::MolecularSurfaceCalculator::MolecularSurfaceCalculator ( )

MolecularSurfaceCalculator constructor, initializes default settings.

References Reset(), and settings.

core::scoring::sc::MolecularSurfaceCalculator::~MolecularSurfaceCalculator ( )
override

References Reset().

Member Function Documentation

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().

void core::scoring::sc::MolecularSurfaceCalculator::AddDot ( int const  molecule,
int const  type,
Vec3 const &  coor,
ScValue const  area,
Vec3 const &  pcen,
Atom const &  atom 
)
protected
core::Size core::scoring::sc::MolecularSurfaceCalculator::AddResidue ( int  molecule,
core::conformation::Residue const &  residue 
)

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(), Init(), 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().

int core::scoring::sc::MolecularSurfaceCalculator::AssignAtomRadius ( Atom atom)
protected
int core::scoring::sc::MolecularSurfaceCalculator::AssignAttentionNumbers ( std::vector< Atom > &  atom)
protectedvirtual
int core::scoring::sc::MolecularSurfaceCalculator::Calc ( core::pose::Pose const &  pose,
core::Size  jump_id = 0 
)
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().

int core::scoring::sc::MolecularSurfaceCalculator::Calc ( )
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().

int core::scoring::sc::MolecularSurfaceCalculator::CalcDotsForAllAtoms ( std::vector< Atom > &  atoms)
private
int core::scoring::sc::MolecularSurfaceCalculator::CalcDotsForAtoms ( std::vector< Atom > &  atoms)
private
int core::scoring::sc::MolecularSurfaceCalculator::CheckAtomCollision2 ( Vec3 const &  pijk,
Atom const &  atom1,
Atom const &  atom2,
std::vector< Atom * > const &  atoms 
)
private

References core::scoring::sc::Atom::radius, and settings.

Referenced by ThirdLoop().

int core::scoring::sc::MolecularSurfaceCalculator::CheckPointCollision ( Vec3 const &  pcen,
std::vector< Atom * > const &  atoms 
)
private

References settings.

Referenced by GenerateConvexSurface().

int core::scoring::sc::MolecularSurfaceCalculator::CheckProbeCollision ( Vec3 const &  point,
std::vector< const PROBE * > const &  nears,
ScValue const  r2 
)
private
MolecularSurfaceCalculator::ScValue core::scoring::sc::MolecularSurfaceCalculator::DistancePointToLine ( Vec3 const &  cen,
Vec3 const &  axis,
Vec3 const &  pnt 
)
private

Referenced by GenerateToroidalSurface().

int core::scoring::sc::MolecularSurfaceCalculator::FindNeighbordsAndBuriedAtoms ( Atom atom)
private
int core::scoring::sc::MolecularSurfaceCalculator::FindNeighborsForAtom ( Atom atom1)
private
int core::scoring::sc::MolecularSurfaceCalculator::GenerateConcaveSurface ( )
private
int core::scoring::sc::MolecularSurfaceCalculator::GenerateConvexSurface ( Atom const &  atom1)
private
void core::scoring::sc::MolecularSurfaceCalculator::GenerateMolecularSurfaces ( )
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().

int core::scoring::sc::MolecularSurfaceCalculator::GenerateToroidalSurface ( Atom atom1,
Atom atom2,
Vec3 const &  uij,
Vec3 const &  tij,
ScValue  rij,
int  between 
)
private
std::vector<Atom> const& core::scoring::sc::MolecularSurfaceCalculator::GetAtoms ( )
inline

References run_.

std::vector<DOT> const& core::scoring::sc::MolecularSurfaceCalculator::GetDots ( int const  moleculeid)
inline

References run_.

RESULTS const& core::scoring::sc::MolecularSurfaceCalculator::GetResults ( )
inline
std::vector<const DOT*> const& core::scoring::sc::MolecularSurfaceCalculator::GetTrimmedDots ( int const  moleculeid)
inline
int core::scoring::sc::MolecularSurfaceCalculator::Init ( )
virtual
int core::scoring::sc::MolecularSurfaceCalculator::ReadScRadii ( )
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().

int core::scoring::sc::MolecularSurfaceCalculator::SecondLoop ( Atom pAtom1)
private
MolecularSurfaceCalculator::ScValue core::scoring::sc::MolecularSurfaceCalculator::SubArc ( Vec3 const &  cen,
ScValue const  rad,
Vec3 const &  axis,
ScValue const  density,
Vec3 const &  x,
Vec3 const &  v,
std::vector< Vec3 > &  points 
)
private
MolecularSurfaceCalculator::ScValue core::scoring::sc::MolecularSurfaceCalculator::SubCir ( Vec3 const &  cen,
ScValue const  rad,
Vec3 const &  north,
ScValue const  density,
std::vector< Vec3 > &  points 
)
private
MolecularSurfaceCalculator::ScValue core::scoring::sc::MolecularSurfaceCalculator::SubDiv ( Vec3 const &  cen,
ScValue const  rad,
Vec3 const &  x,
Vec3 const &  y,
ScValue  angle,
ScValue  density,
std::vector< Vec3 > &  points 
)
private
int core::scoring::sc::MolecularSurfaceCalculator::ThirdLoop ( Atom pAtom1,
Atom pAtom,
Vec3 const &  uij,
Vec3 const &  tij,
ScValue const  rij 
)
private
int core::scoring::sc::MolecularSurfaceCalculator::WildcardMatch ( char const *  query,
char const *  pattern,
int const  l 
)
protected

Referenced by AssignAtomRadius().

Member Data Documentation

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
std::vector<DOT> core::scoring::sc::MolecularSurfaceCalculator::dots[2]
int core::scoring::sc::MolecularSurfaceCalculator::prevburied
Vec3 core::scoring::sc::MolecularSurfaceCalculator::prevp
std::vector<PROBE> core::scoring::sc::MolecularSurfaceCalculator::probes
std::vector< ATOM_RADIUS > core::scoring::sc::MolecularSurfaceCalculator::radii_
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_
core::Real core::scoring::sc::MolecularSurfaceCalculator::sep
struct { ... } core::scoring::sc::MolecularSurfaceCalculator::settings
std::vector<const DOT*> core::scoring::sc::MolecularSurfaceCalculator::trimmed_dots[2]
core::Real core::scoring::sc::MolecularSurfaceCalculator::weight

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