MSpin-JCoupling  2.1
Classes | Public Member Functions | Protected Attributes | List of all members
magnes::JEquation Class Referenceabstract

The base class for the computation of scalar coupling constants. More...

#include <jequation.h>

Inheritance diagram for magnes::JEquation:
magnes::CCCHEquation magnes::HCCHEquation

Classes

class  Parameter
 Representation of a parameter in an empirical equation. More...
 
class  ParameterSet
 A set of parameters. More...
 

Public Member Functions

 JEquation ()
 Constructor.
 
virtual ~JEquation ()
 Virtual destructor.
 
virtual float GetJ (const Frame &frame, size_t i, size_t j)=0
 
void CoupledPairs (Molecule *molecule, std::vector< magnes::CouplingConstant > &pairs)
 
virtual std::string Name () const =0
 
virtual std::pair< std::string, std::string > CoupledNuclei () const =0
 
virtual int NBonds () const =0
 
virtual std::string Description () const
 html description of the equation This function should be overloaded in inheriting classes to provide a simple description of the equation in HTML format
 
std::string Group () const
 The group to which the equation belongs This function is mainly use to group equations inside MagNes-JCoupling equation box according to the class of compounds they were designed for. returns "General" by default.
 
void SetGroup (const std::string &group)
 
virtual bool SelectFirstAtom (const Molecule *molecule, size_t i)=0
 
virtual bool SelectSecondAtom (const Molecule *molecule, size_t i)=0
 
void SetParameters (std::vector< Parameter > &newparams, int i)
 
const ParameterSetGetParameterSet (size_t i) const
 
ParameterSetGetParameterSet (size_t i)
 
const ParameterSetGetCurrentParameterSet () const
 
ParameterSetGetCurrentParameterSet ()
 
const std::vector< ParameterSet > & GetParameterSets () const
 
std::vector< ParameterSet > & GetParameterSets ()
 
size_t GetCurrentParameterSetIndex () const
 
void SetCurrentSet (size_t n)
 
virtual void InitParameters ()=0
 
void SaveParameters (std::ostream &s) const
 
void LoadParameters (std::istream &s)
 

Protected Attributes

size_t m_s1
 
size_t m_s2
 

Detailed Description

The base class for the computation of scalar coupling constants.

JEquation is a base class for implementation of empirical equations for scalar J coupling computations using empirical equations, like Karplus Altona....

Member Function Documentation

§ CoupledNuclei()

virtual std::pair< std::string , std::string > magnes::JEquation::CoupledNuclei ( ) const
pure virtual
Returns
the names of two nuclei being coupled

Implemented in magnes::CCCHEquation, and magnes::HCCHEquation.

§ CoupledPairs()

void magnes::JEquation::CoupledPairs ( Molecule molecule,
std::vector< magnes::CouplingConstant > &  pairs 
)

Fill the vector

Parameters
pairswith all computable J pairs in Molecule
molecule

§ GetCurrentParameterSet() [1/2]

const ParameterSet& magnes::JEquation::GetCurrentParameterSet ( ) const
Returns
set of parameters currently active

§ GetCurrentParameterSet() [2/2]

ParameterSet& magnes::JEquation::GetCurrentParameterSet ( )
Returns
set of parameters currently active

§ GetCurrentParameterSetIndex()

size_t magnes::JEquation::GetCurrentParameterSetIndex ( ) const
Returns
the index of the active parameter set

§ GetJ()

virtual float magnes::JEquation::GetJ ( const Frame frame,
size_t  i,
size_t  j 
)
pure virtual
Returns
the scalar coupling constant in Hz for atoms
Parameters
iand
j(from 0 to N-1) in corformer
frame

§ GetParameterSet() [1/2]

const ParameterSet& magnes::JEquation::GetParameterSet ( size_t  i) const
Returns
a reference of the parameters at index
Parameters
i

§ GetParameterSet() [2/2]

ParameterSet& magnes::JEquation::GetParameterSet ( size_t  i)
Returns
a reference of the parameters at index
Parameters
i

§ GetParameterSets() [1/2]

const std::vector<ParameterSet>& magnes::JEquation::GetParameterSets ( ) const
Returns
a const reference to a vector with all parameters sets

§ GetParameterSets() [2/2]

std::vector<ParameterSet>& magnes::JEquation::GetParameterSets ( )
Returns
a non const reference to a vector with all parameters sets

§ InitParameters()

virtual void magnes::JEquation::InitParameters ( )
pure virtual

Init the parameter list

§ LoadParameters()

void magnes::JEquation::LoadParameters ( std::istream &  s)

Load parameters from stream

§ Name()

virtual std::string magnes::JEquation::Name ( ) const
pure virtual
Returns
the name of the equation to be displayed

§ NBonds()

virtual int magnes::JEquation::NBonds ( ) const
pure virtual
Returns
the number of bonds between the two coupled nuclei

Implemented in magnes::CCCHEquation, and magnes::HCCHEquation.

§ SaveParameters()

void magnes::JEquation::SaveParameters ( std::ostream &  s) const

Save set of parameters to stream

§ SelectFirstAtom()

virtual bool magnes::JEquation::SelectFirstAtom ( const Molecule molecule,
size_t  i 
)
pure virtual

Check if atom

Parameters
ican be selected

Implemented in magnes::CCCHEquation, and magnes::HCCHEquation.

§ SelectSecondAtom()

virtual bool magnes::JEquation::SelectSecondAtom ( const Molecule molecule,
size_t  i 
)
pure virtual

Check if the second atom

Parameters
jcan be selected

Implemented in magnes::CCCHEquation, and magnes::HCCHEquation.

§ SetCurrentSet()

void magnes::JEquation::SetCurrentSet ( size_t  n)

set the active parameter set to

Parameters
n

§ SetGroup()

void magnes::JEquation::SetGroup ( const std::string &  group)

set the group which the equation belongs

§ SetParameters()

void magnes::JEquation::SetParameters ( std::vector< Parameter > &  newparams,
int  i 
)

Fill the set of parameters sets to

Parameters
newparamsin position
i

Member Data Documentation

§ m_s1

size_t magnes::JEquation::m_s1
protected

first atom selected

§ m_s2

size_t magnes::JEquation::m_s2
protected

second atom selected


The documentation for this class was generated from the following file: