Debian Codegraph @

ccp4mg-utils/mmut/mmut_bonds.h

raw symbols SCIP
1 /*
2 mmut/mmut_bonds.h: CCP4MG Molecular Graphics Program
3 Copyright (C) 2001-2008 University of York, CCLRC
4
5 This library is free software: you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License
7 version 3, modified in accordance with the provisions of the
8 license to address the requirements of UK law.
9
10 You should have received a copy of the modified GNU Lesser General
11 Public License along with this library. If not, copies may be
12 downloaded from http://www.ccp4.ac.uk/ccp4license.php
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18 */
19
20
21 #ifndef __CCP4MolBonds__
22 #define __CCP4MolBonds__
23 #include <mmdb_manager.h>
24 #include <mman_base.h>
25 #include <mmdb_sbase.h>
26 #include <mmut_sbase.h>
27
28
29 DefineClass(CMolBondParams);
30
31 class CMolBondParams {
32
33 friend class CMolBonds;
34 friend class CMMANManager;
35 public:
36 CMolBondParams(CMGSBase *sbase);
37 ~CMolBondParams();
38 protected:
39 mmdb::realtype interResCut;
40 mmdb::realtype intraResCut;
41 mmdb::realtype maxBondRad;
42 mmdb::realtype maxBondRadFactor;
43 CMGSBase *sbase;
44
45 };
46
47 DefineClass(CMolBonds);
48
49 class CMolBonds : public CMMANBase {
50 public :
51
52 // Constructors
53 CMolBonds( const PCMMUTManager molHndin, CMolBondParams *params );
54 // , int selHndin, CMolBondParams *params);
55
56 // Destructor
57 ~CMolBonds();
58 std::string FindBonds (int udd_sbaseCompoundID,
59 int udd_sbaseAtomOrdinal, int udd_atomEnergyType );
60
61 void AddConnection (int ia1, int ia2, mmdb::PPAtom selAtom1, mmdb::PPAtom selAtom2,
62 int offset1 =0 , int offset2 = 0);
63 void AddConnection (int ia1, int ia2, mmdb::PPAtom selAtom,int offset=0);
64 void AddConnection (mmdb::PAtom pa1, mmdb::PAtom pa2);
65 int DeleteConnection ( mmdb::PAtom pa1 , mmdb::PAtom pa2);
66
67 bool isInterResBond ( mmdb::PAtom p1, mmdb::PAtom p2);
68 int IntraResContacts ( mmdb::PResidue p1, int nAlt, mmdb::PPAtom modelSelAtom[]=NULL, int nSelAtom[]=NULL, int firstModel=0, int lastModel=0);
69 bool ltBondDistance ( mmdb::PAtom pa1, mmdb::PAtom pa2, mmdb::realtype dist);
70
71 private:
72
73 CMolBondParams *params;
74
75 int nAtoms;
76 int nRes;
77 psvector sbaseCompoundID;
78 mmdb::ivector sbaseAtomIndex;
79
80 // Structures for holding the selected bonds
81 int nB;
82 imatrix bonds;
83
84 };
85 #endif