19 #ifndef OST_MOL_ALG_FILTER_CLASHES_HH
20 #define OST_MOL_ALG_FILTER_CLASHES_HH
25 namespace ost {
namespace mol {
namespace alg {
32 avg_length_(avg_length),
33 avg_zscore_(avg_zscore),
50 atom1_(atom1),atom2_(atom2),mdl_dist_(mdl_dist),adjusted_ref_dist_(adjusted_ref_dist) {}
59 Real adjusted_ref_dist_;
67 ClashingInfo (
int clash_count,
Real average_offset,
const std::vector<ClashEvent>& clash_list):
68 clash_count_(clash_count), average_offset_ (average_offset),clash_list_(clash_list) {}
76 std::vector<ClashEvent> clash_list_;
86 Real mdl_value, std::pair<Real,Real> allowed_range ):
87 atom1_(atom1),atom2_(atom2),mdl_value_(mdl_value),allowed_range_(allowed_range) {}
96 std::pair<Real,Real> allowed_range_;
107 Real mdl_value, std::pair<Real,Real> allowed_range ):
108 atom1_(atom1),atom2_(atom2),atom3_(atom3),mdl_value_(mdl_value),allowed_range_(allowed_range) {}
119 std::pair<Real,Real> allowed_range_;
126 avg_zscore_bonds_(0),
129 avg_zscore_angles_(0),
136 Real avg_zscore_angles,
int bad_angle_count,
int angle_count,
137 const std::map<String,BondLengthInfo>& avg_bond_length_info,
138 const std::vector<StereoChemicalBondViolation>& bond_violation_list,
139 const std::vector<StereoChemicalAngleViolation>& angle_violation_list):
140 avg_zscore_bonds_(avg_zscore_bonds),
141 bad_bond_count_(bad_bond_count),
142 bond_count_(bond_count),
143 avg_zscore_angles_(avg_zscore_angles),
144 bad_angle_count_(bad_angle_count),
145 angle_count_(angle_count),
146 avg_bond_length_info_(avg_bond_length_info),
147 bond_violation_list_(bond_violation_list),
148 angle_violation_list_(angle_violation_list) {}
161 Real avg_zscore_bonds_;
164 Real avg_zscore_angles_;
165 int bad_angle_count_;
167 std::map<String,BondLengthInfo> avg_bond_length_info_;
168 std::vector<StereoChemicalBondViolation> bond_violation_list_;
169 std::vector<StereoChemicalAngleViolation> angle_violation_list_;
203 std::map <String,std::pair<Real,Real> > min_distance_;
204 Real default_min_distance_;
205 Real default_min_distance_tolerance_;
240 std::map<std::pair<String,String>,std::pair<Real,Real> > params_;
286 Real angle_tolerance,
287 bool always_remove_bb=
false);
300 Real angle_tolerance,
301 bool always_remove_bb=
false);
BondLengthInfo(Real avg_length, Real avg_zscore, int count)
ClashEvent(const UniqueAtomIdentifier &atom1, const UniqueAtomIdentifier &atom2, Real mdl_dist, Real adjusted_ref_dist)
UniqueAtomIdentifier GetSecondAtom() const
Real GetAdjustedReferenceDistance() const
Real GetModelDistance() const
UniqueAtomIdentifier GetFirstAtom() const
List of reference atom-atom distances to detect clashes between non-bonded atoms.
void PrintAllDistances() const
Prints all distances in the list to standard output.
Real GetAdjustedClashingDistance(const String &ele1, const String &ele2) const
Recovers a reference distance already adjusted by the tolerance threshold from the list.
Real GetMaxAdjustedDistance() const
Recovers the longest distance in the list, corrected by tolerance.
bool IsEmpty() const
Returns true if the list is empty (i.e. in an invalid, useless state)
void SetClashingDistance(const String &ele1, const String &ele2, Real min_distance, Real tolerance)
Adds or replaces an entry.
ClashingDistances()
Default constructor (creates an empty list)
std::pair< Real, Real > GetClashingDistance(const String &ele1, const String &ele2) const
Recovers a reference distance and a tolerance threshold (respectively) from the list.
Real GetAverageOffset() const
std::vector< ClashEvent > GetClashList() const
int GetClashCount() const
ClashingInfo(int clash_count, Real average_offset, const std::vector< ClashEvent > &clash_list)
StereoChemicalAngleViolation(const UniqueAtomIdentifier &atom1, const UniqueAtomIdentifier &atom2, const UniqueAtomIdentifier &atom3, Real mdl_value, std::pair< Real, Real > allowed_range)
Real GetAngleWidth() const
StereoChemicalAngleViolation()
std::pair< Real, Real > GetAllowedRange() const
UniqueAtomIdentifier GetSecondAtom() const
UniqueAtomIdentifier GetThirdAtom() const
UniqueAtomIdentifier GetFirstAtom() const
StereoChemicalBondViolation(const UniqueAtomIdentifier &atom1, const UniqueAtomIdentifier &atom2, Real mdl_value, std::pair< Real, Real > allowed_range)
Real GetBondLength() const
std::pair< Real, Real > GetAllowedRange() const
StereoChemicalBondViolation()
UniqueAtomIdentifier GetSecondAtom() const
UniqueAtomIdentifier GetFirstAtom() const
List of stereo chemical parameters (Bonds and angles)
void SetParam(const String ¶m, const String &residue, Real value, Real st_dev)
Adds or replaces an entry.
bool ContainsParam(const String ¶m, const String &residue) const
Checks if the list contains an entry for a specific stereo-chemical item (a bond or atom in a specifi...
bool IsEmpty() const
Returns true if the list is empty (i.e. in an invalid, useless state)
std::pair< Real, Real > GetParam(const String &element, const String &residue) const
Recovers mean and standard deviation (respectively) of a stereoā»chemical item (bond or angle) from th...
void PrintAllParameters() const
Prints all distances in the list to standard output.
StereoChemistryInfo(Real avg_zscore_bonds, int bad_bond_count, int bond_count, Real avg_zscore_angles, int bad_angle_count, int angle_count, const std::map< String, BondLengthInfo > &avg_bond_length_info, const std::vector< StereoChemicalBondViolation > &bond_violation_list, const std::vector< StereoChemicalAngleViolation > &angle_violation_list)
Real GetAvgZscoreAngles() const
int GetAngleCount() const
std::vector< StereoChemicalAngleViolation > GetAngleViolationList()
std::map< String, BondLengthInfo > GetAvgBondLengthInfo()
std::vector< StereoChemicalBondViolation > GetBondViolationList()
int GetBadBondCount() const
int GetBadAngleCount() const
Real GetAvgZscoreBonds() const
Contains the infomation needed to uniquely identify an atom in a structure.
#define DLLEXPORT_OST_MOL_ALG
ClashingDistances DLLEXPORT_OST_MOL_ALG FillClashingDistances(std::vector< String > &stereo_chemical_props_file, bool check=false)
Fills a list of reference clashing distances from the content of a parameter file.
std::pair< EntityView, ClashingInfo > DLLEXPORT_OST_MOL_ALG FilterClashes(const EntityView &ent, const ClashingDistances &min_distances, bool always_remove_bb=false)
Filters a structure based on detected clashes between non bonded atoms. Entity version.
std::pair< EntityView, StereoChemistryInfo > DLLEXPORT_OST_MOL_ALG CheckStereoChemistry(const EntityView &ent, const StereoChemicalParams &bond_table, const StereoChemicalParams &angle_table, Real bond_tolerance, Real angle_tolerance, bool always_remove_bb=false)
Filters a structure based on detected stereo-chemical violations. Entity version.
StereoChemicalParams DLLEXPORT_OST_MOL_ALG FillStereoChemicalParams(const String &header, std::vector< String > &stereo_chemical_props_file, bool check=false)
Fills a list of stereo-chemical statistics from the content of a parameter file.