BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Protected Attributes | List of all members
BALL::ResidueChecker Class Reference

#include <BALL/STRUCTURE/residueChecker.h>

Inheritance diagram for BALL::ResidueChecker:
BALL::UnaryProcessor< Residue > BALL::UnaryFunctor< Residue, Processor::Result >

Public Types

enum  TestType {
  MISSING_ATOMS = 0, EXTRA_ATOMS, ELEMENTS, SUSPECT_BOND_LENGTHS,
  NON_INTEGRAL_NET_CHARGE, LARGE_CHARGES, LARGE_NET_CHARGE, NAN_POSITIONS,
  OVERLAPPING_ATOMS, STRONGLY_OVERLAPPING_ATOMS, DUPLICATE_ATOM_NAMES, UNKNOWN_RESIDUES,
  NUMBER_OF_TESTS
}
 
- Public Types inherited from BALL::UnaryFunctor< Residue, Processor::Result >
typedef Processor::Result result_type
 
typedef Residue argument_type
 
typedef Residueargument_reference
 
typedef const Residueconst_argument_reference
 
typedef Residueargument_pointer
 
typedef const Residueconst_argument_pointer
 

Public Member Functions

 ResidueChecker ()
 
 ResidueChecker (FragmentDB &fragment_db)
 
 ResidueChecker (const ResidueChecker &residue_checker)
 
virtual ~ResidueChecker ()
 
void enable (TestType t, bool enable=true)
 
void disable (TestType t)
 
void enableSelection ()
 
void disableSelection ()
 
bool isSelectionEnabled ()
 
bool getStatus () const
 
bool isEnabled (TestType t) const
 
Processor::Result operator() (Residue &residue)
 
bool start ()
 
bool finish ()
 
Explicit tests
bool checkAtomPositions (const Residue &res, const String &res_name)
 
bool checkCharge (const Residue &res, const String &res_name)
 
bool checkCompleteness (const Residue &res, const Residue &reference, const String &res_name)
 
bool checkTemplate (const Residue &res, const Residue &reference, const String &res_name)
 
- Public Member Functions inherited from BALL::UnaryProcessor< Residue >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 

Protected Attributes

FragmentDBfragment_db_
 
bool status_
 
BitVector tests_
 
bool selection_
 

Detailed Description

Residue Consistency Checker. This processor checks residues for internal consistency. It identifies missing or superfluous atoms, suspect bond lengths and non-integral or extremely large charges on the residue. Atom positions are checked as well: a warning is printed, if any of the atom's coordinates is not a number (NaN). Warnings are emitted to Log .

The individual tests can be enabled/disabled using the enable and disable methods. Please use the enum TestTypes to refer to the appropriate tests. By default all tests are enabled except for OVERLAPPING_ATOMS.

The following tests are currently implemented:

Definition at line 126 of file residueChecker.h.

Member Enumeration Documentation

EnumsEnum to refer to the individual tests. The values of this enum are used by enable , disable , and isEnabled .

Enumerator
MISSING_ATOMS 
EXTRA_ATOMS 
ELEMENTS 
SUSPECT_BOND_LENGTHS 
NON_INTEGRAL_NET_CHARGE 
LARGE_CHARGES 
LARGE_NET_CHARGE 
NAN_POSITIONS 
OVERLAPPING_ATOMS 
STRONGLY_OVERLAPPING_ATOMS 
DUPLICATE_ATOM_NAMES 
UNKNOWN_RESIDUES 
NUMBER_OF_TESTS 

Definition at line 141 of file residueChecker.h.

Constructor & Destructor Documentation

BALL::ResidueChecker::ResidueChecker ( )

Constructors and DestructorsDefault constructor

BALL::ResidueChecker::ResidueChecker ( FragmentDB fragment_db)

Detailed constructor

BALL::ResidueChecker::ResidueChecker ( const ResidueChecker residue_checker)

Copy constructor

virtual BALL::ResidueChecker::~ResidueChecker ( )
virtual

Destructor

Member Function Documentation

bool BALL::ResidueChecker::checkAtomPositions ( const Residue res,
const String res_name 
)
bool BALL::ResidueChecker::checkCharge ( const Residue res,
const String res_name 
)
bool BALL::ResidueChecker::checkCompleteness ( const Residue res,
const Residue reference,
const String res_name 
)
bool BALL::ResidueChecker::checkTemplate ( const Residue res,
const Residue reference,
const String res_name 
)
void BALL::ResidueChecker::disable ( TestType  t)

Disable a specific test

void BALL::ResidueChecker::disableSelection ( )
inline

Disable selection of problematic atoms

Definition at line 211 of file residueChecker.h.

void BALL::ResidueChecker::enable ( TestType  t,
bool  enable = true 
)

AccessorsEnable a specific test

void BALL::ResidueChecker::enableSelection ( )
inline

Enable selection of problematic atoms

Definition at line 207 of file residueChecker.h.

bool BALL::ResidueChecker::finish ( )
virtual

finish method

Reimplemented from BALL::UnaryProcessor< Residue >.

bool BALL::ResidueChecker::getStatus ( ) const

Return true if the last application did not produce any warning. The getStatus method may be called after applying the ResidueChecker to a kernel object.

Returns
bool true if no warnings occured, false otherwise
bool BALL::ResidueChecker::isEnabled ( TestType  t) const

Check whether a specific test is enabled

bool BALL::ResidueChecker::isSelectionEnabled ( )
inline

Return the status of the selection

Definition at line 215 of file residueChecker.h.

Processor::Result BALL::ResidueChecker::operator() ( Residue residue)
virtual

Processor-related methods

Reimplemented from BALL::UnaryProcessor< Residue >.

bool BALL::ResidueChecker::start ( )
virtual

start method

Reimplemented from BALL::UnaryProcessor< Residue >.

Member Data Documentation

FragmentDB* BALL::ResidueChecker::fragment_db_
protected

Definition at line 277 of file residueChecker.h.

bool BALL::ResidueChecker::selection_
protected

Definition at line 286 of file residueChecker.h.

bool BALL::ResidueChecker::status_
protected

Definition at line 280 of file residueChecker.h.

BitVector BALL::ResidueChecker::tests_
protected

Definition at line 283 of file residueChecker.h.