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

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
   bool   use_rosetta_radii

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 @defailed 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

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

◆ ScValue

◆ Vec3

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

Constructor & Destructor Documentation

◆ MolecularSurfaceCalculator()

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

MolecularSurfaceCalculator constructor, initializes default settings.

References Reset(), and settings.

◆ ~MolecularSurfaceCalculator()

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

References Reset().

Member Function Documentation

◆ AddAtom()

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

◆ AddDot()

void core::scoring::sc::MolecularSurfaceCalculator::AddDot ( int const  molecule,
int const  type,
Vec3 const &  coor,
ScValue const  area,
Vec3 const &  pcen,
Atom const &  atom 

◆ AddResidue()

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(), core::scoring::sc::Atom::atom_type_radius, Init(), core::chemical::AtomType::is_acceptor(), core::chemical::AtomType::is_donor(), core::chemical::ResidueType::is_metal(), core::conformation::Residue::is_virtual(), core::chemical::AtomType::lj_radius(), 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(), core::scoring::sc::ElectrostaticSimilarityCalculator::AddResidue(), protocols::pose_sewing::movers::BlockwiseAnalysisMover::apply(), core::scoring::sc::ElectrostaticSimilarityCalculator::Calc(), Calc(), core::scoring::sc::ShapeSimilarityCalculator::CalcSs(), protocols::analysis::InterfaceAnalyzerMover::compute_interface_sc(), protocols::simple_filters::ContactMolecularSurfaceFilter::setup_from_selectors(), protocols::simple_filters::ShapeComplementarityFilter::setup_from_selectors(), core::simple_metrics::metrics::ShapeSimilarityMetric::setup_from_selectors(), protocols::simple_filters::ShapeComplementarityFilter::setup_multi_component_symm(), and protocols::simple_filters::ShapeComplementarityFilter::setup_single_component_symm().

◆ AssignAtomRadius()

int core::scoring::sc::MolecularSurfaceCalculator::AssignAtomRadius ( Atom atom)

◆ AssignAttentionNumbers()

int core::scoring::sc::MolecularSurfaceCalculator::AssignAttentionNumbers ( std::vector< Atom > &  atom)

◆ Calc() [1/2]

int core::scoring::sc::MolecularSurfaceCalculator::Calc ( )

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::ShapeSimilarityCalculator, and 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().

◆ Calc() [2/2]

int core::scoring::sc::MolecularSurfaceCalculator::Calc ( core::pose::Pose const &  pose,
core::Size  jump_id = 0 

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

Referenced by protocols::pockets::PocketGrid::get_connolly_surfacePoints(), and protocols::hotspot_hashing::SurfaceSearchPattern::SurfaceSearchPattern().

◆ CalcDotsForAllAtoms()

int core::scoring::sc::MolecularSurfaceCalculator::CalcDotsForAllAtoms ( std::vector< Atom > &  atoms)

◆ CalcDotsForAtoms()

int core::scoring::sc::MolecularSurfaceCalculator::CalcDotsForAtoms ( std::vector< Atom > &  atoms)

◆ CheckAtomCollision2()

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

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

Referenced by ThirdLoop().

◆ CheckPointCollision()

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

References atoms, and settings.

Referenced by GenerateConvexSurface().

◆ CheckProbeCollision()

int core::scoring::sc::MolecularSurfaceCalculator::CheckProbeCollision ( Vec3 const &  point,
std::vector< const PROBE * > const &  nears,
ScValue const  r2 

◆ DistancePointToLine()

MolecularSurfaceCalculator::ScValue core::scoring::sc::MolecularSurfaceCalculator::DistancePointToLine ( Vec3 const &  cen,
Vec3 const &  axis,
Vec3 const &  pnt 

Referenced by GenerateToroidalSurface().

◆ FindNeighbordsAndBuriedAtoms()

int core::scoring::sc::MolecularSurfaceCalculator::FindNeighbordsAndBuriedAtoms ( Atom atom)

◆ FindNeighborsForAtom()

int core::scoring::sc::MolecularSurfaceCalculator::FindNeighborsForAtom ( Atom atom1)

◆ GenerateConcaveSurface()

int core::scoring::sc::MolecularSurfaceCalculator::GenerateConcaveSurface ( )

◆ GenerateConvexSurface()

int core::scoring::sc::MolecularSurfaceCalculator::GenerateConvexSurface ( Atom const &  atom1)

◆ GenerateMolecularSurfaces()

void core::scoring::sc::MolecularSurfaceCalculator::GenerateMolecularSurfaces ( )

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 Calc(), core::scoring::sc::ShapeComplementarityCalculator::Calc(), core::scoring::sc::ShapeSimilarityCalculator::Calc(), and core::scoring::sc::ContactMolecularSurfaceCalculator::CalcContactArea().

◆ GenerateToroidalSurface()

int core::scoring::sc::MolecularSurfaceCalculator::GenerateToroidalSurface ( Atom atom1,
Atom atom2,
Vec3 const &  uij,
Vec3 const &  tij,
ScValue  rij,
int  between 

◆ GetAtoms()

std::vector<Atom> const& core::scoring::sc::MolecularSurfaceCalculator::GetAtoms ( )

References run_.

◆ GetDots()

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

◆ GetResults()

RESULTS const& core::scoring::sc::MolecularSurfaceCalculator::GetResults ( )

◆ GetTrimmedDots()

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

◆ Init()

int core::scoring::sc::MolecularSurfaceCalculator::Init ( )

◆ ReadScRadii()

int core::scoring::sc::MolecularSurfaceCalculator::ReadScRadii ( )

Read atom radius definitions from file @defailed 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().

◆ Reset()

void core::scoring::sc::MolecularSurfaceCalculator::Reset ( )

◆ SecondLoop()

int core::scoring::sc::MolecularSurfaceCalculator::SecondLoop ( Atom pAtom1)

◆ SubArc()

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 

◆ SubCir()

MolecularSurfaceCalculator::ScValue core::scoring::sc::MolecularSurfaceCalculator::SubCir ( Vec3 const &  cen,
ScValue const  rad,
Vec3 const &  north,
ScValue const  density,
std::vector< Vec3 > &  points 

◆ SubDiv()

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 

References core::pose::motif::a(), density, and MAX_SUBDIV.

Referenced by SubArc(), and SubCir().

◆ ThirdLoop()

int core::scoring::sc::MolecularSurfaceCalculator::ThirdLoop ( Atom pAtom1,
Atom pAtom,
Vec3 const &  uij,
Vec3 const &  tij,
ScValue const  rij 

◆ WildcardMatch()

int core::scoring::sc::MolecularSurfaceCalculator::WildcardMatch ( char const *  query,
char const *  pattern,
int const  l 

Referenced by AssignAtomRadius().

Member Data Documentation

◆ atoms

std::vector<Atom> core::scoring::sc::MolecularSurfaceCalculator::atoms

◆ band

core::Real core::scoring::sc::MolecularSurfaceCalculator::band

◆ binwidth_dist

core::Real core::scoring::sc::MolecularSurfaceCalculator::binwidth_dist

◆ binwidth_norm

core::Real core::scoring::sc::MolecularSurfaceCalculator::binwidth_norm

◆ density

core::Real core::scoring::sc::MolecularSurfaceCalculator::density

◆ dots

std::vector<DOT> core::scoring::sc::MolecularSurfaceCalculator::dots[2]

◆ near_squared_size

core::Real core::scoring::sc::MolecularSurfaceCalculator::near_squared_size

◆ prevburied

int core::scoring::sc::MolecularSurfaceCalculator::prevburied

◆ prevp

Vec3 core::scoring::sc::MolecularSurfaceCalculator::prevp

◆ probes

std::vector<PROBE> core::scoring::sc::MolecularSurfaceCalculator::probes

◆ radii_

std::vector< ATOM_RADIUS > core::scoring::sc::MolecularSurfaceCalculator::radii_

Referenced by AssignAtomRadius(), Init(), and ReadScRadii().

◆ radmax

ScValue core::scoring::sc::MolecularSurfaceCalculator::radmax

◆ results

RESULTS core::scoring::sc::MolecularSurfaceCalculator::results

◆ rp

core::Real core::scoring::sc::MolecularSurfaceCalculator::rp


struct { ... } core::scoring::sc::MolecularSurfaceCalculator::run_

◆ sep

core::Real core::scoring::sc::MolecularSurfaceCalculator::sep


struct { ... } core::scoring::sc::MolecularSurfaceCalculator::settings

◆ trimmed_dots

std::vector<const DOT*> core::scoring::sc::MolecularSurfaceCalculator::trimmed_dots[2]

◆ use_rosetta_radii

bool core::scoring::sc::MolecularSurfaceCalculator::use_rosetta_radii

◆ weight

core::Real core::scoring::sc::MolecularSurfaceCalculator::weight

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