File: disulfidBondProcessor.h

package info (click to toggle)
ball 1.5.0%2Bgit20180813.37fc53c-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 239,888 kB
  • sloc: cpp: 326,149; ansic: 4,208; python: 2,303; yacc: 1,778; lex: 1,099; xml: 958; sh: 322; makefile: 95
file content (106 lines) | stat: -rw-r--r-- 2,493 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#ifndef BALL_STRUCTURE_DISULFIDBONDPROCESSOR_H
#define BALL_STRUCTURE_DISULFIDBONDPROCESSOR_H

#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif

#ifndef BALL_KERNEL_SYSTEM_H
# include <BALL/KERNEL/system.h>
#endif

#include <set>

namespace BALL
{
	/** Disulfid Bond Processor
	    \ingroup StructureMiscellaneous
	*/

	/** Detection and Computation of disulfid bonds of the atom container.
	 */
	class BALL_EXPORT DisulfidBondProcessor
		: public UnaryProcessor<AtomContainer>
	{
		public:
		/** @name Type definitions
		 */
		//@{
		typedef std::pair<Residue*, Residue*>  DisulfidBond;
		typedef	std::set<DisulfidBond>         DisulfidBonds;
		//@}

		BALL_CREATE(DisulfidBondProcessor);


		/** @name	Constructors and Destructors
		 */
		//@{

		/// Default Constructor
		DisulfidBondProcessor();

		/// Destructor
		virtual ~DisulfidBondProcessor();
		//@}

		/**	@name	Processor-related methods 
		*/
		//@{

		/// Processor method which is called before the operator()-call.
		virtual bool start();

		/** Clears the data structures.
		*/
		void clear();

		/** Operator () for the processor 
		 */
		virtual Processor::Result operator ()(AtomContainer& ac);

		/// Processor method which is called after the operator()-call.
		virtual bool finish();

		//@}

		/** @name Accessors.
		*/
		//@{

		/// Return the number of detected disulfid bonds.
		Size getNumberOfDetectedDisulfidBonds() {return sulfur_bridges_.size();};

		/// Return the vector of disulfid bonds.
		DisulfidBonds& getDisulfidBonds() {return sulfur_bridges_;};

		/// Return the vector of disulfid bonds, const variant.
		const DisulfidBonds& getDisulfidBonds() const {return sulfur_bridges_;};

		//@}

		/// Connect two sulfurs by disulid bond
		bool connect(Atom* atom1, Atom* atom2, bool toggle = false);

		/// Connect two residues by disulid bond
		bool connect(Residue* residue1, Residue* residue2, bool toggle = false);

		/// Connect two atom containers by disulid bond
		bool connect(Composite* composite1, Composite* composite2, bool toggle = false);

		/// Disconnect a disulid bond
		bool disconnect(Atom* atom1, Atom* atom2);

		/// Disconnect a disulid bond by its residues 
		bool disconnect(Residue* residue1, Residue* residue2);

		/// Disconnect a disulid bond by its constitutional atom containers
		bool disconnect(Composite* composite1, Composite* composite2);


		protected:
			DisulfidBonds  sulfur_bridges_;
	};
}

#endif // BALL_STRUCTURE_DISULFIDBONDPROCESSOR_H