Loading...
Searching...
No Matches
templates.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// Molecular Mechanics Parameter: class describing the atom type section of a parameter file
#ifndef BALL_MOLMEC_PARAMETER_TEMPLATES_H
#define BALL_MOLMEC_PARAMETER_TEMPLATES_H
#ifndef BALL_FORMAT_PARAMETERSECTION_H
# include <BALL/FORMAT/parameterSection.h>
#endif
#ifndef BALL_KERNEL_SYSTEM_H
# include <BALL/KERNEL/system.h>
#endif
#ifndef BALL_DATATYPE_HASHSET_H
# include <BALL/DATATYPE/hashset.h>
#endif
#include <BALL/KERNEL/atom.h>
namespace BALL
{
class Atom;
class BALL_EXPORT Templates
: public ParameterSection
{
public:
Templates();
Templates(const Templates& templates, bool deep = true);
virtual ~Templates() ;
virtual void clear() ;
virtual bool extractSection(Parameters& parameters, const String& section_name);
float getCharge(const String& name) const;
String getTypeName(const String& name) const;
bool has(const String& name) const;
void assign(System& system, bool overwrite_existing_typenames = true,
bool overwrite_non_zero_charges = true) const;
void assignCharges(System& system, bool overwrite_non_zero_charges = true) const;
void assignTypeNames(System& system, bool overwrite_existing_typenames = true) const;
Templates& operator = (const Templates& templates);
void setMaximumUnassignedAtoms(Size nr);
Size getMaximumUnassignedAtoms() const;
Size getNumberOfUnassignedAtoms() const;
HashSet<const Atom*>& getUnassignedAtoms();
protected:
/*_ Contains the charge for each residue/atom combination
*/
StringHashMap<float> charges_;
/*_ Contains the atom type names for each residue/atom combination
*/
StringHashMap<String> type_names_;
//_ Atoms, for which the assignment fails
HashSet<const Atom*> unassigned_atoms_;
//_ max number of unassigned atoms
Size max_number_unassigned_atoms_;
};
} // namespace BALL
#endif // BALL_MOLMEC_PARAMETER_TEMPLATES_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
system.h
atom.h
BALL::Atom
Definition atom.h:90
BALL::HashSet
Definition hashSet.h:46
BALL::ParameterSection::ParameterSection
ParameterSection()
BALL::Parameters
Definition parameters.h:25
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
BALL::Templates::extractSection
virtual bool extractSection(Parameters &parameters, const String &section_name)
BALL::Templates::getMaximumUnassignedAtoms
Size getMaximumUnassignedAtoms() const
BALL::Templates::assignCharges
void assignCharges(System &system, bool overwrite_non_zero_charges=true) const
BALL::Templates::assignTypeNames
void assignTypeNames(System &system, bool overwrite_existing_typenames=true) const
BALL::Templates::Templates
Templates(const Templates &templates, bool deep=true)
BALL::Templates::assign
void assign(System &system, bool overwrite_existing_typenames=true, bool overwrite_non_zero_charges=true) const
BALL::Templates::getUnassignedAtoms
HashSet< const Atom * > & getUnassignedAtoms()
Get the atoms, for which the assignment failed.
BALL::Templates::setMaximumUnassignedAtoms
void setMaximumUnassignedAtoms(Size nr)
BALL::Templates::getCharge
float getCharge(const String &name) const
BALL::Templates::unassigned_atoms_
HashSet< const Atom * > unassigned_atoms_
Definition templates.h:135
BALL::Templates::type_names_
StringHashMap< String > type_names_
Definition templates.h:132
BALL::Templates::getNumberOfUnassignedAtoms
Size getNumberOfUnassignedAtoms() const
Get the number of atoms, for which the assignment failed.
BALL::Templates::Templates
Templates()
BALL::Templates::max_number_unassigned_atoms_
Size max_number_unassigned_atoms_
Definition templates.h:138
BALL::Templates::has
bool has(const String &name) const
BALL::Templates::~Templates
virtual ~Templates()
BALL::Templates::clear
virtual void clear()
BALL::Templates::charges_
StringHashMap< float > charges_
Definition templates.h:128
BALL::Templates::getTypeName
String getTypeName(const String &name) const
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
parameterSection.h