| 45 |
|
#include "utils/ParameterManager.hpp" |
| 46 |
|
#include "utils/StringUtils.hpp" |
| 47 |
|
#include "io/ParamConstraint.hpp" |
| 48 |
+ |
#define __C |
| 49 |
+ |
#include "UseTheForce/fForceOptions.h" |
| 50 |
|
|
| 51 |
|
namespace oopse { |
| 52 |
|
|
| 56 |
|
DeclareParameter(DistanceMixingRule, std::string); |
| 57 |
|
DeclareParameter(DistanceType, std::string); |
| 58 |
|
DeclareParameter(EnergyMixingRule, std::string); |
| 59 |
+ |
DeclareParameter(CutoffPolicy, std::string); |
| 60 |
|
DeclareParameter(EnergyUnitScaling, double); |
| 61 |
|
DeclareParameter(DistanceUnitScaling, double); |
| 62 |
|
DeclareParameter(AngleUnitScaling, double); |
| 76 |
|
CheckParameter(DistanceType, isEqualIgnoreCase(std::string("sigma")) || isEqualIgnoreCase(std::string("Rmin"))); |
| 77 |
|
CheckParameter(EnergyMixingRule, isEqualIgnoreCase(std::string("arithmetic")) || isEqualIgnoreCase(std::string("geometric"))); |
| 78 |
|
CheckParameter(TorsionAngleConvention, isEqualIgnoreCase(std::string("180 is trans")) || isEqualIgnoreCase(std::string("0 is trans"))); |
| 79 |
< |
} |
| 79 |
> |
CheckParameter(CutoffPolicy, isEqualIgnoreCase(std::string("MIX")) || isEqualIgnoreCase(std::string("MAX")) || isEqualIgnoreCase(std::string("TRADITIONAL"))); |
| 80 |
> |
} |
| 81 |
|
|
| 82 |
|
bool setData(const std::string& keyword, const std::string& value) { |
| 83 |
|
bool result; |
| 84 |
|
ParamMap::iterator i =parameters_.find(keyword); |
| 85 |
|
if (i != parameters_.end()) { |
| 86 |
< |
if(isType<int>(value)){ |
| 86 |
> |
if(isInteger(value)){ |
| 87 |
|
int ival = lexi_cast<int>(value); |
| 88 |
|
result = i->second->setData(ival); |
| 89 |
|
} |
| 101 |
|
|
| 102 |
|
return result; |
| 103 |
|
} |
| 104 |
< |
|
| 104 |
> |
|
| 105 |
> |
void makeFortranOptions(ForceOptions & fortranForceOptions); |
| 106 |
|
private: |
| 107 |
|
typedef std::map<std::string, ParameterBase*> ParamMap; |
| 108 |
|
ParamMap parameters_; |