/usr/include/BALL/FORMAT/HINFile.h is in libball1.4-dev 1.4.3~beta1-4.
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 | // -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_FORMAT_HINFILE_H
#define BALL_FORMAT_HINFILE_H
#ifndef BALL_FORMAT_GENERICMOLFILE_H
# include <BALL/FORMAT/genericMolFile.h>
#endif
#ifndef BALL_MATHS_SIMPLEBOX3_H
# include <BALL/MATHS/simpleBox3.h>
#endif
namespace BALL
{
/**
* HyperChem file class.
* This class enables BALL to read and write HyperChem HIN files. \par
*
* Note: HIN defines a Molecule as a connected component in the molecule graph
* If you read e.g. a protein from a PDBFile, such that no bonds are set
* each atom will be placed into its own molecule. To prevent this from
* happening use the \link FragmentDB FragmentDB to build missing bonds.
*
* \ingroup StructureFormats
*/
class BALL_EXPORT HINFile
: public GenericMolFile
{
public:
/** @name Constructors and Destructors
*/
//@{
/** Default constructor
*/
HINFile();
/** Detailed constructor
* @throw Exception::FileNotFound if the file could not be opened
*/
HINFile(const String& filename, File::OpenMode open_mode = std::ios::in);
/** Destructor
*/
virtual ~HINFile();
//@}
/** @name Assignment.
*/
//@{
/** Assignment operator.
* @throw Exception::FileNotFound if the file could not be opened
*/
const HINFile& operator = (const HINFile& rhs);
//@}
/** @name Reading and Writing of Kernel Datastructures
*/
//@{
/** Write a molecule to a HIN file.
* Note that this changes the properties of atoms in the system.
* @throw File::CannotWrite if writing to the file failed
*/
virtual bool write(const Molecule& molecule);
/** Write a system to a HIN file.
* Note that this changes the properties of atoms in the system.
* @throw File::CannotWrite if writing to the file failed
*/
virtual bool write(const System& system);
/** Read a molecule from the HIN file
* @throw Exception::ParseError if a syntax error was encountered
*/
virtual Molecule* read();
/** @copydoc GenericMolFile(System& system)
*/
virtual bool read(System& system);
//@}
/** @name Accessors
*/
//@{
/** Check for a periodic boundary in the file.
*/
bool hasPeriodicBoundary() const;
/** Return the periodic boundary of the file.
An empty box is returned if no periodic boundary is defined.
@return the boundary box
*/
SimpleBox3 getPeriodicBoundary() const;
/** Return the temperature stored in the file.
HIN files may contain a <tt>sys</tt> entry containing
the temperature of the last simulation step. If it is set,
it is returned. Otherwise 0 is returned.
@return the final simulation temperature
*/
float getTemperature() const;
//@}
protected:
SimpleBox3 box_;
/// Initialize temperature and box dimensions prior to reading a system.
virtual void initRead_();
float temperature_;
void writeAtom_(const Atom& atom, Size number, Size atom_offset);
};
} // namespace BALL
#endif // BALL_FORMAT_HINFILE_H
|