5 #ifndef BALL_STRUCTURE_REDUCEDSURFACE_H
6 #define BALL_STRUCTURE_REDUCEDSURFACE_H
8 #ifndef BALL_MATHC_COMMON_H
12 #ifndef BALL_MATHS_SIMPLEBOX3_H
16 #ifndef BALL_MATHS_CIRCLE3_H
20 #ifndef BALL_MATHS_SPHERE_H
24 #ifndef BALL_MATHS_VECTOR3_H
28 #ifndef BALL_DATATYPE_HASHSET_H
32 #ifndef BALL_DATATYPE_HASHSET_H
36 #ifndef BALL_COMMON_EXCEPTION_H
40 #ifndef BALL_STRUCTURE_RSEDGE_H
44 #ifndef BALL_STRUCTURE_RSFACE_H
48 #ifndef BALL_STRUCTURE_RSVERTEX_H
64 if (
a >
b) std::swap(
a,
b);
69 return (
a == pos.
a) && (
b == pos.
b);
81 if (
a >
b) std::swap(
a,
b);
82 if (
a >
c) std::swap(
a,
c);
83 if (
b >
c) std::swap(
b,
c);
88 return (
a == pos.
a) && (
b == pos.
b) && (
c == pos.
c);
97 #ifdef BALL_HAS_BOOST_UNORDERED_MAP
102 #ifdef BALL_EXTEND_HASH_IN_STD_NS
105 #endif // BALL_EXTEND_HASH_IN_STD_NS
107 #ifdef BALL_HAS_TR1_UNORDERED_MAP
110 #endif // BALL_HAS_TR1_UNORDERED_MAP
112 struct hash<BALL::SortedPosition2> :
public std::unary_function<BALL::SortedPosition2, size_t>
116 return 5323 * p.
a + 1847 * p.
b;
121 struct hash<BALL::SortedPosition3> :
public std::unary_function<BALL::SortedPosition3, size_t>
125 return 5323 * p.
a + 1847 * p.
b + 2347 * p.
c;
128 #ifdef BALL_HAS_TR1_UNORDERED_MAP
130 #endif // BALL_HAS_TR1_UNORDERED_MAP
132 #ifdef BALL_EXTEND_HASH_IN_STD_NS
134 #endif // BALL_EXTEND_HASH_IN_STD_NS
136 #ifdef BALL_HAS_BOOST_UNORDERED_MAP
143 class SolventExcludedSurface;
145 class SESSingularityCleaner;
146 class TriangulatedSES;
147 class SolventAccessibleSurface;
148 class TriangulatedSAS;
149 class SESTriangulator;
195 ReducedSurface(const ReducedSurface& reduced_surface,
bool = true);
200 ReducedSurface(const std::vector<
TSphere3<
double> >& spheres,
201 const
double& probe_radius);
205 virtual ~ReducedSurface();
215 void operator = (const ReducedSurface& reduced_surface);
220 void set(const ReducedSurface& reduced_surface);
238 Size numberOfAtoms() const;
243 Size numberOfVertices() const;
248 Size numberOfEdges() const;
253 Size numberOfFaces() const;
258 double getProbeRadius() const;
265 throw(Exception::IndexOverflow);
272 throw(Exception::IndexOverflow);
279 throw(Exception::IndexOverflow);
286 throw(Exception::IndexOverflow);
296 void insert(
RSEdge* rsedge);
301 void insert(
RSFace* rsface);
306 double getMaximalRadius() const;
329 TAngle<
double>& angle,
bool check = false) const;
334 throw(Exception::GeneralException,
335 Exception::DivisionByZero,
336 Exception::IndexOverflow);
344 bool canBeCopied(const ReducedSurface& reduced_surface);
348 void copy(const ReducedSurface& reduced_surface);
369 std::vector<
RSEdge*>& rsedge1,
370 std::vector<
RSEdge*>& rsedge2);
385 double probe_radius_;
427 BALL_EXPORT std::ostream& operator << (std::ostream& s, const ReducedSurface& rs);
463 STATUS_ON_SURFACE = 0,
501 throw(Exception::GeneralException,
502 Exception::DivisionByZero,
503 Exception::IndexOverflow);
516 void preProcessing();
520 void getRSComponent()
521 throw(Exception::GeneralException,
522 Exception::DivisionByZero,
523 Exception::IndexOverflow);
528 bool treatFace(
RSFace* face)
529 throw(Exception::GeneralException,
530 Exception::DivisionByZero,
531 Exception::IndexOverflow);
536 bool treatEdge(
RSEdge* edge)
537 throw(Exception::GeneralException,
538 Exception::DivisionByZero,
539 Exception::IndexOverflow);
546 void correct(
Index atom);
550 void extendComponent()
551 throw(Exception::GeneralException,
552 Exception::DivisionByZero,
553 Exception::IndexOverflow);
571 throw(Exception::GeneralException,
572 Exception::DivisionByZero,
573 Exception::IndexOverflow);
592 throw(Exception::DivisionByZero);
604 throw(Exception::DivisionByZero);
616 throw(Exception::DivisionByZero);
679 void findThirdAtom(
Index atom1,
Index atom2, const std::deque<
Index>& third,
694 const std::deque<Index>& neighboursOfTwoAtoms(const
SortedPosition2& pos);
704 void neighboursOfThreeAtoms(Index atom1, Index atom2, Index atom3,
705 std::deque<Index>& output_list);
716 double getCircleExtremum(const
TCircle3<
double>& circle,
743 bool getCircles(Index atom1, Index atom2,
TCircle3<
double>& circle1,
799 void correctProbePosition(
Position atom);
811 void insert(
RSEdge* edge);
815 void insert(
RSFace* face);
828 std::vector< std::deque<Index> > neighbours_;
856 #endif // BALL_STRUCTURE_REDUCEDSURFACE_H