OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
filter_clashes.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_MOL_ALG_FILTER_CLASHES_HH
20 #define OST_MOL_ALG_FILTER_CLASHES_HH
21 
22 #include <ost/mol/entity_view.hh>
24 
25 namespace ost { namespace mol { namespace alg {
26 
29 {
30 
31 public:
33  ClashingDistances(): valid_flag_(true) {}
34 
38  void SetClashingDistance(const String& ele1,const String& ele2, Real min_distance, Real tolerance);
39 
41  std::pair<Real,Real> GetClashingDistance(const String& ele1,const String& ele2) const;
42 
44  Real GetAdjustedClashingDistance(const String& ele1,const String& ele2) const;
45 
47  Real GetMaxAdjustedDistance() const;
48 
50  bool IsEmpty() const;
51 
53  void PrintAllDistances() const;
54 
55 private:
56 
57  std::map <String,std::pair<float,float> > min_distance_;
58  Real default_min_distance_;
59  Real default_min_distance_tolerance_;
60  bool valid_flag_;
61 
62 };
63 
68 {
69 
70 public:
72  void SetParam(const String& param, const String& residue, Real value, Real st_dev);
73 
77  std::pair<Real,Real> GetParam(const String& element,const String& residue) const;
78 
82  bool ContainsParam(const String& param,const String& residue) const;
83 
87  bool IsEmpty() const;
88 
90  void PrintAllParameters() const;
91 
92 private:
93 
94  std::map<std::pair<String,String>,std::pair<float,float> > params_;
95 
96 };
97 
101 ClashingDistances DLLEXPORT_OST_MOL_ALG FillClashingDistances(std::vector<String>& stereo_chemical_props_file);
102 
107 StereoChemicalParams DLLEXPORT_OST_MOL_ALG FillStereoChemicalParams(const String& header, std::vector<String>& stereo_chemical_props_file);
108 
117  const ClashingDistances& min_distances, bool always_remove_bb=false);
118 
127  const ClashingDistances& min_distances, bool always_remove_bb=false);
128 
137  const StereoChemicalParams& bond_table,
138  const StereoChemicalParams& angle_table,
139  Real bond_tolerance,
140  Real angle_tolerance,
141  bool always_remove_bb=false);
142 
151  const StereoChemicalParams& bond_table,
152  const StereoChemicalParams& angle_table,
153  Real bond_tolerance,
154  Real angle_tolerance,
155  bool always_remove_bb=false);
156 
157 
158 }}}
159 
160 
161 #endif