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);
101 if (
a >
b) std::swap(
a,
b);
102 if (
a >
c) std::swap(
a,
c);
103 if (
b >
c) std::swap(
b,
c);
108 return (
a == pos.
a) && (
b == pos.
b) && (
c == pos.
c);
149 #if defined(BALL_HAS_UNORDERED_MAP) || defined(BALL_HAS_HASH_MAP)
151 #ifdef BALL_EXTEND_HASH_IN_STD_NS
154 #endif // BALL_EXTEND_HASH_IN_STD_NS
156 namespace BALL_MAP_NAMESPACE {
158 struct hash<BALL::SortedPosition2> :
public std::unary_function<BALL::SortedPosition2, size_t>
162 return 5323 * p.
a + 1847 * p.
b;
167 struct hash<BALL::SortedPosition3> :
public std::unary_function<BALL::SortedPosition3, size_t>
171 return 5323 * p.
a + 1847 * p.
b + 2347 * p.
c;
176 #ifdef BALL_EXTEND_HASH_IN_STD_NS
178 #endif // BALL_EXTEND_HASH_IN_STD_NS
185 class SolventExcludedSurface;
187 class SESSingularityCleaner;
188 class TriangulatedSES;
189 class SolventAccessibleSurface;
190 class TriangulatedSAS;
191 class SESTriangulator;
237 ReducedSurface(const ReducedSurface& reduced_surface,
bool = true);
242 ReducedSurface(const std::vector<
TSphere3<
double> >& spheres,
243 const
double& probe_radius);
247 virtual ~ReducedSurface();
257 void operator = (const ReducedSurface& reduced_surface);
262 void set(const ReducedSurface& reduced_surface);
280 Size numberOfAtoms() const;
285 Size numberOfVertices() const;
290 Size numberOfEdges() const;
295 Size numberOfFaces() const;
300 double getProbeRadius() const;
307 throw(Exception::IndexOverflow);
314 throw(Exception::IndexOverflow);
321 throw(Exception::IndexOverflow);
328 throw(Exception::IndexOverflow);
338 void insert(
RSEdge* rsedge);
343 void insert(
RSFace* rsface);
348 double getMaximalRadius() const;
371 TAngle<
double>& angle,
bool check = false) const;
376 throw(Exception::GeneralException,
377 Exception::DivisionByZero,
378 Exception::IndexOverflow);
386 bool canBeCopied(const ReducedSurface& reduced_surface);
390 void copy(const ReducedSurface& reduced_surface);
411 std::vector<
RSEdge*>& rsedge1,
412 std::vector<
RSEdge*>& rsedge2);
427 double probe_radius_;
469 BALL_EXPORT std::ostream& operator << (std::ostream& s, const ReducedSurface& rs);
505 STATUS_ON_SURFACE = 0,
543 throw(Exception::GeneralException,
544 Exception::DivisionByZero,
545 Exception::IndexOverflow);
558 void preProcessing();
562 void getRSComponent()
563 throw(Exception::GeneralException,
564 Exception::DivisionByZero,
565 Exception::IndexOverflow);
570 bool treatFace(
RSFace* face)
571 throw(Exception::GeneralException,
572 Exception::DivisionByZero,
573 Exception::IndexOverflow);
578 bool treatEdge(
RSEdge* edge)
579 throw(Exception::GeneralException,
580 Exception::DivisionByZero,
581 Exception::IndexOverflow);
588 void correct(
Index atom);
592 void extendComponent()
593 throw(Exception::GeneralException,
594 Exception::DivisionByZero,
595 Exception::IndexOverflow);
613 throw(Exception::GeneralException,
614 Exception::DivisionByZero,
615 Exception::IndexOverflow);
634 throw(Exception::DivisionByZero);
646 throw(Exception::DivisionByZero);
658 throw(Exception::DivisionByZero);
721 void findThirdAtom(
Index atom1,
Index atom2, const std::deque<
Index>& third,
736 const std::deque<Index>& neighboursOfTwoAtoms(const
SortedPosition2& pos);
746 void neighboursOfThreeAtoms(Index atom1, Index atom2, Index atom3,
747 std::deque<Index>& output_list);
758 double getCircleExtremum(const
TCircle3<
double>& circle,
785 bool getCircles(Index atom1, Index atom2,
TCircle3<
double>& circle1,
841 void correctProbePosition(
Position atom);
853 void insert(
RSEdge* edge);
857 void insert(
RSFace* face);
870 std::vector< std::deque<Index> > neighbours_;
898 #endif // BALL_STRUCTURE_REDUCEDSURFACE_H