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) {}
71 std::vector<ClashEvent> GetClashList()
const;
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_;
184 void SetClashingDistance(
const String& ele1,
const String& ele2,
Real min_distance,
Real tolerance);
187 std::pair<Real,Real> GetClashingDistance(
const String& ele1,
const String& ele2)
const;
190 Real GetAdjustedClashingDistance(
const String& ele1,
const String& ele2)
const;
193 Real GetMaxAdjustedDistance()
const;
196 bool IsEmpty()
const;
199 void PrintAllDistances()
const;
203 std::map <String,std::pair<Real,Real> > min_distance_;
204 Real default_min_distance_;
205 Real default_min_distance_tolerance_;
223 std::pair<Real,Real> GetParam(
const String& element,
const String& residue)
const;
228 bool ContainsParam(
const String& param,
const String& residue)
const;
233 bool IsEmpty()
const;
236 void PrintAllParameters()
const;
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);
std::vector< StereoChemicalAngleViolation > GetAngleViolationList()
UniqueAtomIdentifier GetThirdAtom() const
Real GetBondLength() const
int GetAngleCount() const
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.
#define DLLEXPORT_OST_MOL_ALG
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.
StereoChemicalAngleViolation(const UniqueAtomIdentifier &atom1, const UniqueAtomIdentifier &atom2, const UniqueAtomIdentifier &atom3, Real mdl_value, std::pair< Real, Real > allowed_range)
ClashingInfo(int clash_count, Real average_offset, const std::vector< ClashEvent > &clash_list)
Real GetAverageOffset() const
ClashEvent(const UniqueAtomIdentifier &atom1, const UniqueAtomIdentifier &atom2, Real mdl_dist, Real adjusted_ref_dist)
StereoChemicalAngleViolation()
std::pair< Real, Real > GetAllowedRange() const
ClashingDistances()
Default constructor (creates an empty list)
Contains the infomation needed to uniquely identify an atom in a structure.
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)
int GetBadAngleCount() const
int GetBadBondCount() const
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.
UniqueAtomIdentifier GetSecondAtom() const
Real GetAvgZscoreAngles() const
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. ...
StereoChemicalBondViolation()
Real GetAvgZscoreBonds() const
UniqueAtomIdentifier GetFirstAtom() const
UniqueAtomIdentifier GetFirstAtom() const
Real GetAdjustedReferenceDistance() const
int GetClashCount() const
UniqueAtomIdentifier GetSecondAtom() const
List of stereo chemical parameters (Bonds and angles)
Real GetModelDistance() const
UniqueAtomIdentifier GetSecondAtom() const
BondLengthInfo(Real avg_length, Real avg_zscore, int count)
std::map< String, BondLengthInfo > GetAvgBondLengthInfo()
StereoChemicalBondViolation(const UniqueAtomIdentifier &atom1, const UniqueAtomIdentifier &atom2, Real mdl_value, std::pair< Real, Real > allowed_range)
std::pair< Real, Real > GetAllowedRange() const
UniqueAtomIdentifier GetFirstAtom() const
List of reference atom-atom distances to detect clashes between non-bonded atoms. ...
std::vector< StereoChemicalBondViolation > GetBondViolationList()
Real GetAngleWidth() const