/usr/include/BALL/KERNEL/molecule.h is in libball1.4-dev 1.4.1+20111206-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | // -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_KERNEL_MOLECULE_H
#define BALL_KERNEL_MOLECULE_H
#ifndef BALL_KERNEL_ATOMCONTAINER_H
# include <BALL/KERNEL/atomContainer.h>
#endif
#ifndef BALL_KERNEL_FRAGMENT_H
# include <BALL/KERNEL/fragment.h>
#endif
#ifndef BALL_KERNEL_FRAGMENTITERATOR_H
# include <BALL/KERNEL/fragmentIterator.h>
#endif
namespace BALL
{
class System;
/** Molecule class.
Used to represent general molecules without specific properties. \par
\ingroup KernelContainers
*/
class BALL_EXPORT Molecule
: public AtomContainer
{
public:
BALL_CREATE_DEEP(Molecule)
/** @name Enums
*/
//@{
/** Properties
*/
enum Property
{
IS_SOLVENT = AtomContainer::NUMBER_OF_PROPERTIES,
NUMBER_OF_PROPERTIES
};
//@}
/** @name Constructors and Destructors
*/
//@{
/** Default constructor.
*/
Molecule();
/** Copy constructor.
*/
Molecule(const Molecule& molecule, bool deep = true);
/** Detailled constructor.
*/
Molecule(const String& name);
/** Destructor.
*/
virtual ~Molecule();
//@}
/** @name Persistence
*/
//@{
/** Writes a Molecule object to a persistent stream.
* @param pm the persistence manager
*/
void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
/** Reads a Molecule object from a persistent stream.
* @param pm the persistence manager
*/
void persistentRead(PersistenceManager& pm);
//@}
/** @name Assignment
*/
//@{
/** Assign from another Molecule.
@param molecule the Molecule object to assign from
@param deep make a deep (=<tt>true</tt>) or shallow (=<tt>false</tt>) copy
*/
void set(const Molecule& molecule, bool deep = true);
/** Assignment operator.
@param molecule the Molecule to assign from
**/
Molecule& operator = (const Molecule& molecule);
/** Assign to another Molecule.
@param molecule the Molecule to be assigned to
@param deep make a deep (=<tt>true</tt>) or shallow (=<tt>false</tt>) copy
*/
void get(Molecule& molecule, bool deep = true) const;
/** Swap the contents of two molecules.
@param molecule the Molecule to swap contents with
*/
void swap(Molecule& molecule);
//@}
/** @name Accessors
*/
//@{
/** Access the parent System.
@return System* pointer to the parent System
*/
System* getSystem();
/** Get a const pointer to the parent System.
@return System* pointer to the parent System
*/
const System* getSystem() const;
/** Insert an atom as the first child.
@param atom the atom to add
*/
void prepend(Atom& atom);
/** Insert an atom as the last child.
@param atom the atom to add
*/
void append(Atom& atom);
/** Insert an atom as the last child.
@param atom the atom to add
*/
void insert(Atom& atom);
/** Insert an atom before a Composite object.
@param atom the atom to insert
@param before the Composite object to insert before
*/
void insertBefore(Atom& atom, Composite& before);
/** Insert an atom after a Composite object.
@param atom the atom to insert
@param after the Composite object to insert after
*/
void insertAfter(Atom& atom, Composite& after);
/** Remove an atom.
@param atom the atom to remove
*/
bool remove(Atom& atom);
/** Insert an AtomContainer as the first child.
@param atom_container the AtomContainer to add
*/
void prepend(AtomContainer& atom_container);
/** Append an AtomContainer as the last child.
@param atom_container the AtomContainer to add
*/
void append(AtomContainer& atom_container);
/** Insert an AtomContainer as the last child.
@param atom_container the AtomContainer to add
*/
void insert(AtomContainer& atom_container);
/** Insert an AtomContainer before a given Composite object.
@param atom_container the AtomContainer to insert
@param before the Composite object to insert before
*/
void insertBefore(AtomContainer& atom_container, Composite& before);
/** Insert an AtomContainer after a given Composite object.
@param atom_container the AtomContainer to insert
@param after the Composite object to insert after
*/
void insertAfter(AtomContainer& atom_container, Composite& after);
/** Cut all children of <tt>atom_container</tt> and prepend them before the children of this molecule.
@param atom_container the AtomContainer to access
*/
void spliceBefore(AtomContainer& atom_container);
/** Cut all children of <tt>atom_container</tt> and append them after the children of this molecule.
@param atom_container the AtomContainer to access
*/
void spliceAfter(AtomContainer& atom_container);
/** Move the children of atom_container into this molecule.
The children of <tt>atom_container</tt> are inserted at the position of
<tt>atom_container</tt> if it is a child of <tt>this</tt>.
Otherwise the children are inserted using \link spliceBefore spliceBefore \endlink .
*/
void splice(AtomContainer& atom_container);
/** Remove an AtomContainer.
@param atom_container the AtomContainer to remove
*/
bool remove(AtomContainer& atom_container);
//@}
/** @name Debugging and Diagnostics
*/
//@{
/** Internal state dump.
Dump the current internal state to the
output ostream <b> s </b> with dumping depth <b> depth </b>.
@param s output stream where to output the internal state
@param depth the dumping depth
*/
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
//@}
/** Equality operator.
Two molecules are equal if they have the same handle.
@see Object::operator ==.
*/
bool operator == (const Molecule& molecule) const;
/** Inequality operator
@see operator ==
*/
bool operator != (const Molecule& molecule) const;
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Fragment)
protected:
Molecule* getMolecule();
const Molecule* getMolecule() const;
AtomContainer* getSuperAtomContainer();
const AtomContainer* getSuperAtomContainer() const;
void prepend(Molecule& molecule);
void append(Molecule& molecule);
void insert(Molecule& molecule);
void insertBefore(Molecule& molecule, Composite& composite);
void insertAfter(Molecule& molecule, Composite& composite);
bool remove(Molecule& molecule);
bool isSubAtomContainerOf(const AtomContainer& atom_container) const;
};
} // namespace BALL
#endif // BALL_KERNEL_MOLECULE_H
|