17 #if !defined JEQUATION_H 24 #include <magnes/molecule.h> 25 #include <magnes/couplingconstant.h> 28 #define JEQUATION_EXPORT __declspec(dllexport) 30 #define JEQUATION_API __declspec(dllexport) 32 #define JEQUATION_API __declspec(dllimport) 36 #define JEQUATION_EXPORT 47 class JEquationPrivate;
69 Parameter(
const std::string& name,
float value) {_name=name; _value=value; }
72 void SetName(
const std::string& name) { _name=name; }
76 const std::string&
Name()
const {
return _name; }
80 float Value()
const {
return _value; }
99 const std::vector<Parameter>&
Set()
const {
return _set; }
101 std::vector<Parameter>&
Set() {
return _set; }
103 std::string
Name()
const {
return _name; }
105 void SetName(
const std::string& name) { _name=name; }
111 void Save(std::ostream& s)
const;
113 std::vector<Parameter> _set;
123 virtual float GetJ(
const Frame& frame,
size_t i,
size_t j) =0;
125 void CoupledPairs(
Molecule* molecule, std::vector<magnes::CouplingConstant>& pairs);
127 virtual std::string Name()
const =0;
129 virtual std::pair < std::string , std::string > CoupledNuclei()
const =0;
131 virtual int NBonds()
const =0;
135 virtual std::string Description()
const;
140 std::string Group()
const;
142 void SetGroup(
const std::string& group);
144 virtual bool SelectFirstAtom(
const Molecule* molecule,
size_t i) =0;
146 virtual bool SelectSecondAtom(
const Molecule* molecule,
size_t i) =0;
149 void SetParameters(std::vector<Parameter>& newparams,
int i);
159 const std::vector<ParameterSet>& GetParameterSets()
const;
161 std::vector<ParameterSet>& GetParameterSets();
163 size_t GetCurrentParameterSetIndex()
const;
165 void SetCurrentSet(
size_t n);
167 virtual void InitParameters() =0;
169 void SaveParameters(std::ostream& s)
const;
171 void LoadParameters(std::istream& s);
173 void ExtractParameters(std::istream& s,
ParameterSet& p);
174 std::string GetParametersOrEquationName(
const std::string& line);
182 JEquationPrivate* m_private;
size_t m_s2
Definition: jequation.h:180
size_t m_s1
Definition: jequation.h:178
void SetName(const std::string &name)
Definition: jequation.h:105
MAGNES_CORE_API std::ostream & operator<<(std::ostream &s, const Coordinate &c)
Definition: coordinate.h:269
the global magnes namespace
Definition: ccchequation.h:38
std::string Name() const
Definition: jequation.h:103
Parameter(const std::string &name, float value)
Definition: jequation.h:69
The base class for the computation of scalar coupling constants.
Definition: jequation.h:53
const std::vector< Parameter > & Set() const
Definition: jequation.h:99
Definition: molecule.h:44
ParameterSet()
Empty constructor.
Definition: jequation.h:95
void SetValue(float value)
Definition: jequation.h:78
float Value() const
Definition: jequation.h:80
const std::string & Name() const
Definition: jequation.h:76
Representation of a parameter in an empirical equation.
Definition: jequation.h:62
A set of parameters.
Definition: jequation.h:91
std::vector< Parameter > & Set()
Definition: jequation.h:101
void SetName(const std::string &name)
Definition: jequation.h:72
ParameterSet(const std::string &name)
Construct an empty parameter set with name n.
Definition: jequation.h:97
Representation of a conformer.
Definition: frame.h:33