| 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); | 
| 66 | 
  | 
    DeclareParameter(dielectric, double); | 
| 67 | 
  | 
     | 
| 68 | 
  | 
  public: | 
| 69 | 
< | 
    ForceFieldOptions() { | 
| 67 | 
< | 
      DefineOptionalParameter(Name, "Name"); | 
| 68 | 
< | 
      DefineOptionalParameterWithDefaultValue(vdWtype, "vdWtype", "Lennard-Jones"); | 
| 69 | 
< | 
      DefineOptionalParameterWithDefaultValue(DistanceMixingRule, "DistanceMixingRule", "arithmetic"); | 
| 70 | 
< | 
      DefineOptionalParameterWithDefaultValue(DistanceType, "DistanceType", "sigma"); | 
| 71 | 
< | 
      DefineOptionalParameterWithDefaultValue(EnergyMixingRule, "EnergyMixingRule", "geometric"); | 
| 72 | 
< | 
      DefineOptionalParameterWithDefaultValue(EnergyUnitScaling, "EnergyUnitScaling", 1.0); | 
| 73 | 
< | 
      DefineOptionalParameterWithDefaultValue(DistanceUnitScaling, "DistanceUnitScaling", 1.0); | 
| 74 | 
< | 
      DefineOptionalParameterWithDefaultValue(AngleUnitScaling, "AngleUnitScaling", 1.0); | 
| 75 | 
< | 
      DefineOptionalParameterWithDefaultValue(TorsionAngleConvention, "TorsionAngleConvention", "180 is trans"); | 
| 76 | 
< | 
      DefineOptionalParameterWithDefaultValue(vdw14scale, "vdW-14-scale", 0.0); | 
| 77 | 
< | 
      DefineOptionalParameterWithDefaultValue(electrostatic14scale, "electrostatic-14-scale", 0.0); | 
| 78 | 
< | 
      DefineOptionalParameterWithDefaultValue(dielectric, "dielectric", 1.0); | 
| 79 | 
< | 
    } | 
| 80 | 
< | 
         | 
| 69 | 
> | 
    ForceFieldOptions(); | 
| 70 | 
  | 
    ForceFieldOptions(const ForceFieldOptions&); | 
| 71 | 
  | 
    ForceFieldOptions& operator = (const ForceFieldOptions&); | 
| 72 | 
  | 
     | 
| 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_;                   |