File: ConstraintContainer.h

package info (click to toggle)
macromoleculebuilder 4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 119,404 kB
  • sloc: cpp: 23,722; python: 5,098; ansic: 2,101; awk: 145; perl: 144; makefile: 40; sh: 38
file content (67 lines) | stat: -rw-r--r-- 3,848 bytes parent folder | download | duplicates (4)
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
/* -------------------------------------------------------------------------- *
 *                           MMB (MacroMoleculeBuilder)                       *
 * -------------------------------------------------------------------------- *
 *                                                                            *
 * Copyright (c) 2011-12 by the Author.                                       *
 * Author: Samuel Flores                                                      *
 *                                                                            *
 * See RNABuilder.cpp for the copyright and usage agreement.                  *
 * -------------------------------------------------------------------------- */

#ifndef ConstraintContainer_H_
#define ConstraintContainer_H_
//#include "BiopolymerClass.h"
#include "Utils.h"
#include <vector>
#include <iostream>

class BiopolymerClassContainer; // trying a forward declaration

class MMB_EXPORT ConstraintToGroundContainer {
private:
	std::vector <ConstraintClass>      constraintClassVector;
	std::vector <ChainResidueToGround> constrainChainRigidSegmentsVector;

public:
        InterfaceContainer interfaceContainer;
  	void clear() {constraintClassVector.clear(); constrainChainRigidSegmentsVector .clear();};

	const ConstraintClass getConstraintClass(int constraintToGroundIndex) const  {
            return constraintClassVector[constraintToGroundIndex]; };

    std::vector<ConstraintClass> & getConstraintClassVector() { return constraintClassVector;}
	// Constrain rigid segments in chain to either ground or a given residue on same chain.  First step:  storing in constrainChainRigidSegmentsVector to queue them:
	void queueConstrainChainRigidSegments (ChainResidueToGround chainResidue){constrainChainRigidSegmentsVector.push_back(chainResidue); };
	// This will take the ChainResidueToGround's in constrainChainRigidSegmentsVector and apply them.  
	void applyConstrainChainRigidSegments (BiopolymerClassContainer & biopolymerClassContainer, CompoundSystem & system,  SimbodyMatterSubsystem & matter,State & state);

	void printConstraintClass(int constraintToGroundIndex) const;
	void validateConstraintClass(const ConstraintClass & myConstraintClass, BiopolymerClassContainer & myBiopolymerClassContainer) ;

					
	void validateConstraintClassVector(BiopolymerClassContainer & myBiopolymerClassContainer);
	void pruneCoordinateCouplers(BiopolymerClassContainer & myBiopolymerClassContainer, DuMMForceFieldSubsystem & _dumm);
	void addConstraintClassToVector(ConstraintClass myConstraintClass);
	void addConstraintClassToVector(String myChain, ResidueID myResidueID, String atomName);
    void addConstraintToVector(String myChain, ResidueID myResidueID, String atomName,
	                           String myChain2, ResidueID myResidueID2, String atomName2);

    void deleteConstraintClass(int index);
    void updateConstraintToVector(
                    int index,
                    String myChain, ResidueID myResidueID, String atomName,
                    BiopolymerClassContainer& biopolymerClassContainer);
    void updateConstraintToVector(
                    int index,
                    String myChain, ResidueID myResidueID, String atomName,
                    String myChain2, ResidueID myResidueID2, String atomName2,
                    BiopolymerClassContainer& biopolymerClassContainer);

	const int numConstraintClasses(){return constraintClassVector.size();};
	void printConstraintClasses();
    bool hasConstraintClass(String myChainID, ResidueID myResidueID);
    bool hasConstraintClass(SimTK::String chain1, SimTK::String chain2); // This checks whether there is any constraint at all, of any type, between two chains.
    void addSingleWeldConstraintPerInterfaceChainPair(  BiopolymerClassContainer & myBiopolymerClassContainer);
};

#endif