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 
45 
47  bool IsEmpty() const;
48 
50  void PrintAllDistances() const;
51 
52 private:
53 
54  std::map <String,std::pair<float,float> > min_distance_;
55  Real default_min_distance_;
56  Real default_min_distance_tolerance_;
57  bool valid_flag_;
58 
59 };
60 
65 {
66 
67 public:
69  void SetParam(const String& param, const String& residue, Real value, Real st_dev);
70 
74  std::pair<Real,Real> GetParam(const String& element,const String& residue) const;
75 
79  bool ContainsParam(const String& param,const String& residue) const;
80 
84  bool IsEmpty() const;
85 
87  void PrintAllParameters() const;
88 
89 private:
90 
91  std::map<std::pair<String,String>,std::pair<float,float> > params_;
92 
93 };
94 
98 ClashingDistances DLLEXPORT_OST_MOL_ALG FillClashingDistances(std::vector<String>& stereo_chemical_props_file);
99 
104 StereoChemicalParams DLLEXPORT_OST_MOL_ALG FillStereoChemicalParams(const String& header, std::vector<String>& stereo_chemical_props_file);
105 
114  const ClashingDistances& min_distances, bool always_remove_bb=false);
115 
124  const ClashingDistances& min_distances, bool always_remove_bb=false);
125 
134  const StereoChemicalParams& bond_table,
135  const StereoChemicalParams& angle_table,
136  Real bond_tolerance,
137  Real angle_tolerance,
138  bool always_remove_bb=false);
139 
148  const StereoChemicalParams& bond_table,
149  const StereoChemicalParams& angle_table,
150  Real bond_tolerance,
151  Real angle_tolerance,
152  bool always_remove_bb=false);
153 
154 
155 }}}
156 
157 
158 #endif