NCBI C++ ToolKit
bond.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: bond.hpp 33815 2007-05-04 17:18:18Z kazimird $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Authors: Paul Thiessen
27 *
28 * File Description:
29 * Classes to hold chemical bonds
30 *
31 * ===========================================================================
32 */
33 
34 #ifndef CN3D_BOND__HPP
35 #define CN3D_BOND__HPP
36 
39 
40 #include "structure_base.hpp"
41 
42 BEGIN_SCOPE(Cn3D)
43 
44 class AtomSet;
45 
46 // A Bond is a link between two atoms, referenced by Atom-pntr (molecule,
47 // residue, and atom IDs).
48 
49 class Bond : public StructureBase
50 {
51 public:
52  enum eBondOrder {
53  eSingle = ncbi::objects::CInter_residue_bond::eBond_order_single,
54  ePartialDouble = ncbi::objects::CInter_residue_bond::eBond_order_partial_double,
55  eAromatic = ncbi::objects::CInter_residue_bond::eBond_order_aromatic,
56  eDouble = ncbi::objects::CInter_residue_bond::eBond_order_double,
57  eTriple = ncbi::objects::CInter_residue_bond::eBond_order_triple,
58  eOther = ncbi::objects::CInter_residue_bond::eBond_order_other,
59  eUnknown = ncbi::objects::CInter_residue_bond::eBond_order_unknown,
60  eVirtual, // special identifier for virtual bonds (no "normal" bond order)
61  eRealDisulfide, // special flag for real disulfides (bonds between cysteine sulfur atoms)
62  eVirtualDisulfide // virtual disulfide - links C-alphas with disulfide color when bb trace
63  };
64 
65  Bond(StructureBase *parent);
66 
67  // public data
71 
72  // public methods
73  bool Draw(const AtomSet *data) const;
74 };
75 
76 const Bond* MakeBond(StructureBase *parent,
77  const ncbi::objects::CAtom_pntr& atomPtr1, const ncbi::objects::CAtom_pntr& atomPtr2,
78  int bondOrder = Bond::eUnknown);
79 const Bond* MakeBond(StructureBase *parent,
80  int mID1, int rID1, int aID1, int mID2, int rID2, int aID2,
81  int bondOrder = Bond::eUnknown);
82 
83 END_SCOPE(Cn3D)
84 
85 #endif // CN3D_BOND__HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
const Bond * MakeBond(StructureBase *parent, const ncbi::objects::CAtom_pntr &atomPtr1, const ncbi::objects::CAtom_pntr &atomPtr2, int bondOrder=Bond::eUnknown)
Definition: bond.hpp:50
AtomPntr atom1
Definition: bond.hpp:68
const Bond * nextVirtual
Definition: bond.hpp:70
bool Draw(const AtomSet *data) const
Definition: bond.cpp:100
AtomPntr atom2
Definition: bond.hpp:68
eBondOrder
Definition: bond.hpp:52
@ ePartialDouble
Definition: bond.hpp:54
@ eTriple
Definition: bond.hpp:57
@ eUnknown
Definition: bond.hpp:59
@ eOther
Definition: bond.hpp:58
@ eVirtualDisulfide
Definition: bond.hpp:62
@ eSingle
Definition: bond.hpp:53
@ eRealDisulfide
Definition: bond.hpp:61
@ eDouble
Definition: bond.hpp:56
@ eVirtual
Definition: bond.hpp:60
@ eAromatic
Definition: bond.hpp:55
eBondOrder order
Definition: bond.hpp:69
const Bond * previousVirtual
Definition: bond.hpp:70
Bond(StructureBase *parent)
Definition: bond.cpp:60
char data[12]
Definition: iconv.c:80
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
Modified on Sat May 25 14:20:51 2024 by modify_doxy.py rev. 669887