Changes in / [d26fb7:6a922b]


Ignore:
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/AtomAction/SaturateAction.cpp

    rd26fb7 r6a922b  
    7979    // add the hydrogens
    8080    const Vector AtomsPosition = _atom->getPosition();
    81     double typical_distance = _atom->getType()->getHBondDistance(0);
     81    double typical_distance = _atom->getType()->getHBondDistance(1);
    8282    if (typical_distance == -1.)
    8383      typical_distance = 1.;
  • src/Actions/WorldAction/SetBoundaryConditionsAction.def

    rd26fb7 r6a922b  
    1818#define paramtypes (std::vector< std::string >)
    1919#define paramtokens ("set-boundary-conditions")
    20 #define paramdescriptions ("new boundary conditions as list of three strings, e.g. 'Wrap Bounce Ignore'")
     20#define paramdescriptions ("new boundary conditions as list of three strings, e.g. 'wrap wrap ignore'")
    2121#undef paramdefaults
    2222#define paramreferences (newconditions)
  • src/Element/element.cpp

    rd26fb7 r6a922b  
    6464    color[i] = (unsigned char)0;
    6565  for (size_t i =0; i<3;++i)
    66     HBondDistance[i] = -1.;
    67   for (size_t i =0; i<3;++i)
    68     HBondAngle[i] = -1.;
     66    HBondDistance[i] = 0.;
     67  for (size_t i =0; i<3;++i)
     68    HBondAngle[i] = 0.;
    6969};
    7070
  • src/Element/elements_db.cpp

    rd26fb7 r6a922b  
    258258const char *HbonddistanceDB =\
    259259"#atomic number bond distances for single, double and triple bond (-1 no bond)\n\
    260 1       0.741283  -1. -1.\n\
    261 2       0  -1. -1.\n\
    262 3       1.65217  -1. -1.\n\
    263 4       1.3455  -1. -1.\n\
    264 5       1.1962  1.19 1.18\n\
    265 6       1.09234  1.076 1.06\n\
    266 7       1.00154  1.02 1.01\n\
    267 8       0.941566  0.957 -1.\n\
    268 9       0.958865  -1. -1.\n\
    269 10      0  -1. -1.\n\
    270 11      1.9426  -1. -1.\n\
    271 12      1.73705  -1. -1.\n\
    272 13      1.60991  -1. -1.\n\
    273 14      1.49796  1.48 1.48\n\
    274 15      1.39145  -1. -1.\n\
    275 16      1.32987  -1. -1.\n\
    276 17      1.31403  -1. -1.\n\
    277 18      0  -1. -1.\n\
    278 19      2.38168  -1. -1.\n\
    279 20      2.39602  -1. -1.\n\
    280 21      1.69169  -1. -1.\n\
    281 22      1.69817  -1. -1.\n\
    282 23      1.75022  -1. -1.\n\
    283 24      1.79185  -1. -1.\n\
    284 25      1.49581  -1. -1.\n\
    285 26      1.76215  -1. -1.\n\
    286 27      1.4284  -1. -1.\n\
    287 28      1.56442  -1. -1.\n\
    288 29      2.00512  -1. -1.\n\
    289 30      1.55672  -1. -1.\n\
    290 31      1.58872  -1. -1.\n\
    291 32      1.5484  -1. -1.\n\
    292 33      1.47208  -1. -1.\n\
    293 34      1.43322  -1. -1.\n\
    294 35      1.45079  -1. -1.\n\
    295 36      0  -1. -1.\n\
     2601       0.74    -1      -1\n\
     2612       0.77429209      -1      -1\n\
     2625       1.23    1.19    1.18\n\
     2636       1.09    1.076   1.06\n\
     2647       1.04    1.02    1.01\n\
     2658       0.96    0.957   -1\n\
     26614      1.48    1.48    1.48\n\
     26715      1.42    -1      -1\n\
     26816      1.35    -1      -1\n\
     26917      1.29    -1      -1\n\
     27020      1.09    1.09    -1\n\
     27134      1.47    -1      -1\n\
     27235      1.44    -1      -1\n\
    296273";
    297274
     
    3032807       0       110     106.67\n\
    3042818       0       104.5   -1\n\
    305 11  0 -1 -1\n\
    30628214      0       120     109.47\n\
    30728315      0       -1      -1\n\
  • src/Element/unittests/ElementUnitTest.cpp

    rd26fb7 r6a922b  
    110110  CPPUNIT_ASSERT_EQUAL( 0, testelement->getNoValenceOrbitals() );
    111111  for (size_t i = 0; i < 3; ++i)
    112     CPPUNIT_ASSERT_EQUAL( -1., testelement->getHBondDistance(i) );
     112    CPPUNIT_ASSERT_EQUAL( 0., testelement->getHBondDistance(i) );
    113113  for (size_t i = 0; i < 3; ++i)
    114     CPPUNIT_ASSERT_EQUAL( -1., testelement->getHBondAngle(i) );
     114    CPPUNIT_ASSERT_EQUAL( 0., testelement->getHBondAngle(i) );
    115115}
    116116
  • src/Fragmentation/Exporters/SaturatedBond.cpp

    rd26fb7 r6a922b  
    6464      saturated_atom.getElement().getHBondDistance(saturated_bond.getDegree()-1);
    6565  ASSERT( HydrogenDistance > 0.,
    66       "SaturatedBond::SaturatedBond() - negative bond distance for "
    67       +saturated_atom.getElement().getName());
     66      "SaturatedBond::SaturatedBond() - negative bond distance");
    6867  const double HydrogenAngle =
    6968      saturated_atom.getElement().getHBondAngle(saturated_bond.getDegree()-1);
    7069  ASSERT( HydrogenAngle >= 0.,
    71       "SaturatedBond::SaturatedBond() - negative bond angle for "
    72       +saturated_atom.getElement().getName());
     70      "SaturatedBond::SaturatedBond() - negative bond angle");
    7371  LOG(5, "DEBUG: Hydrogen distance is " << HydrogenDistance
    7472      << ", angle is " << HydrogenAngle);
  • src/Parameters/Specifics/Value_element.cpp

    rd26fb7 r6a922b  
    3535#include "CodePatterns/MemDebug.hpp"
    3636
    37 #include <boost/lexical_cast.hpp>
    38 
    3937#include "Value_element.hpp"
    4038
     
    4745static const element * FindElementByString(const std::string &_value)
    4846{
    49   const element * elem = NULL;
    50   try {
    51     const int tempvalue = boost::lexical_cast<atomicNumber_t>(_value);
    52     elem = World::getInstance().getPeriode()->FindElement(tempvalue);
    53   } catch( boost::bad_lexical_cast &e) {
    54     elem = World::getInstance().getPeriode()->FindElement(_value);
    55   }
    56   return elem;
     47  static ConvertTo<atomicNumber_t> converter;
     48  const element * _element =
     49      World::getInstance().getPeriode()->FindElement(converter(_value));
     50  return _element;
    5751}
    5852
  • src/Parameters/Specifics/Value_elements.cpp

    rd26fb7 r6a922b  
    5757  for(tokenizer::iterator beg=tok.begin();
    5858      beg != tok.end();++beg) {
    59     const element * elem = NULL;
    60     try {
    61       const int tempvalue = boost::lexical_cast<atomicNumber_t>(*beg);
    62       elem = World::getInstance().getPeriode()->FindElement(tempvalue);
    63     } catch( boost::bad_lexical_cast &e) {
    64       elem = World::getInstance().getPeriode()->FindElement(*beg);
    65     }
    66     ASSERT( elem != NULL,
     59    const int tempvalue = boost::lexical_cast<atomicNumber_t>(*beg);
     60    const element * _element =
     61        World::getInstance().getPeriode()->FindElement(tempvalue);
     62    ASSERT( _element != NULL,
    6763        "FindElementsByString() - cannnot find element "
    68         +toString(*beg)+" in periodentafel.");
    69     elements.push_back(elem);
     64        +toString(tempvalue)+" in periodentafel.");
     65    elements.push_back(_element);
    7066  }
    7167  return elements;
  • src/Parser/MpqcParser.cpp

    rd26fb7 r6a922b  
    309309    *file << "% Created by MoleCuilder" << endl;
    310310    *file << "mpqc: (" << endl;
    311     *file << "\tcheckpoint = no" << endl;
    312311    *file << "\tsavestate = " << getParams().getParameter(MpqcParser_Parameters::savestateParam) << endl;
    313312    *file << "\tdo_gradient = " << getParams().getParameter(MpqcParser_Parameters::do_gradientParam) << endl;
     
    375374      ELOG(0, "Unknown level of theory requested for MPQC output file.");
    376375    }
    377     const std::string jobtype = getParams().getParameter(MpqcParser_Parameters::jobtypeParam);
    378     if (jobtype == getParams().getJobtypeName(MpqcParser_Parameters::Optimization)) {
    379       *file << "\t% optimizer object for the molecular geometry" << endl;
    380       *file << "\topt<QNewtonOpt>: (" << endl;
    381       *file << "\t\tfunction = $..:mole" << endl;
    382       *file << "\t\tupdate<BFGSUpdate>: ()" << endl;
    383       *file << "\t\tconvergence<MolEnergyConvergence>: (" << endl;
    384       *file << "\t\t\tcartesian = yes" << endl;
    385       *file << "\t\t\tenergy = $..:..:mole" << endl;
    386       *file << "\t\t)" << endl;
    387       *file << "\t)" << endl;
    388     }
    389376    *file << ")" << endl;
    390377    *file << "molecule<Molecule>: (" << endl;
  • src/Parser/MpqcParser_Parameters.cpp

    rd26fb7 r6a922b  
    6969    ParamNames[integrationParam] = "integration";
    7070    ParamNames[theoryParam] = "theory";
    71     ParamNames[jobtypeParam] = "jobtype";
    7271  }
    7372
     
    8786  }
    8887  //InvertMap<TheoryNamesType,TheoryLookupType>(TheoryNames,TheoryLookup);
    89 
    90   // create Jobs parameter
    91   {
    92     ValidJobtypes.clear();
    93     ValidJobtypes.resize(unknownJob);
    94     ValidJobtypes[Default]="Default";
    95     ValidJobtypes[Optimization]="Optimization";
    96     appendParameter(
    97         new Parameter<std::string>(
    98             ParamNames[jobtypeParam],
    99             ValidJobtypes,
    100             ValidJobtypes[Default]));
    101   }
    10288
    10389  // create integration parameter
     
    191177}
    192178
    193 /** Getter for name of a specific Parameter.
    194  *
    195  * @param param index among enum Jobtype
    196  * @return name of the desired Jobtype
    197  */
    198 const std::string &MpqcParser_Parameters::getJobtypeName(const enum Jobtype jobtype) const
    199 {
    200   return ValidJobtypes[jobtype];
    201 }
    202 
    203179/** Getter for the name of specific of IntegrationMethod.
    204180 *
  • src/Parser/MpqcParser_Parameters.hpp

    rd26fb7 r6a922b  
    5858    integrationParam,//!< integrationParam, integration method to use in MBPT2 R12
    5959    theoryParam,     //!< theoryParam, level of theory to use
    60     jobtypeParam,    //!< jobtypeParam, job type to use
    6160    unknownParam};   //!< unknownParam, designates an unknown parameter
    6261
     
    7069    MBPT2_R12,  //!< Moeller Plesset Perturbation Theory second order with R12 integral
    7170    unknownTheory //!< designates an unknown theory
    72   };
    73 
    74   /** Enumeration of all known jobtypes.
    75    *
    76    */
    77   enum Jobtype {
    78     Default,       //!< standard energy and force calculation
    79     Optimization,       //!< additional optimization of geometry
    80     unknownJob //!< designates an unknown job
    8171  };
    8272
     
    10393  const std::string &getParameterName(const enum Parameters param) const;
    10494  const std::string &getTheoryName(const enum Theory theory) const;
    105   const std::string &getJobtypeName(const enum Jobtype jobtype) const;
    10695  const std::string &getIntegrationMethodName(const enum IntegrationMethod integration) const;
    10796
     
    11099  //!> vector with all available theories in same order as enum Theory.
    111100  std::vector<std::string> ValidTheories;
    112 
    113   //!> vector with all available jobtypes in same order as enum Jobs.
    114   std::vector<std::string> ValidJobtypes;
    115101
    116102  //!> vector with all available integration methods in same order as enum IntegrationMethod.
  • src/Parser/unittests/ParserMpqcUnitTest.cpp

    rd26fb7 r6a922b  
    6363static string waterMpqc_CLHF ="% Created by MoleCuilder\n\
    6464mpqc: (\n\
    65 \tcheckpoint = no\n\
    6665\tsavestate = no\n\
    6766\tdo_gradient = yes\n\
     
    8786static string waterMpqc_CLKS ="% Created by MoleCuilder\n\
    8887mpqc: (\n\
    89 \tcheckpoint = no\n\
    9088\tsavestate = no\n\
    9189\tdo_gradient = yes\n\
     
    112110static string waterMpqc_MBPT2 ="% Created by MoleCuilder\n\
    113111mpqc: (\n\
    114 \tcheckpoint = no\n\
    115112\tsavestate = no\n\
    116113\tdo_gradient = yes\n\
     
    141138static string waterMpqc_MBPT2_R12 ="% Created by MoleCuilder\n\
    142139mpqc: (\n\
    143 \tcheckpoint = no\n\
    144140\tsavestate = no\n\
    145141\tdo_gradient = yes\n\
  • src/UIElements/CommandLineUI/CommandLineParser.cpp

    rd26fb7 r6a922b  
    390390//            currentOption->hasDefaultValue() ?
    391391//                  po::value < const element * >()->default_value(boost::lexical_cast<const element *>(currentOption->getDefaultValue().c_str())) :
    392                   po::value < std::string >(),
     392                  po::value < int >(),
    393393                  currentOption->getDescription().c_str())
    394394        ;
     
    399399//            currentOption->hasDefaultValue() ?
    400400//                  po::value < std::vector<const element *> >()->default_value(boost::lexical_cast< std::vector<const element *> >(currentOption->getDefaultValue().c_str())) :
    401                   po::value < std::vector<std::string> >()->multitoken(),
     401                  po::value < std::vector<int> >()->multitoken(),
    402402                  currentOption->getDescription().c_str())
    403403        ;
  • src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp

    rd26fb7 r6a922b  
    3636#include "CodePatterns/MemDebug.hpp"
    3737
    38 #include <string>
    39 
    4038#include "CommandLineUI/Query/CommandLineQuery.hpp"
    4139#include "CommandLineUI/CommandLineParser.hpp"
     
    5654  // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector?
    5755  periodentafel *periode = World::getInstance().getPeriode();
     56  int Z = -1;
    5857  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    59     std::string argument("none");
    6058    try {
    61       argument = CommandLineParser::getInstance().vm[getTitle()].as< std::string >();
    62       try {
    63         int Z = -1;
    64         Z = boost::lexical_cast<int>(argument);
    65         temp = periode->FindElement(Z);
    66       } catch(boost::bad_lexical_cast &e) {
    67         temp = periode->FindElement(argument);
    68       }
     59      Z = CommandLineParser::getInstance().vm[getTitle()].as< int >();
    6960    } catch(boost::bad_any_cast &e) {
     61      Z = -1;
    7062      return false;
    7163    }
     64    temp = periode->FindElement(Z);
    7265    ASSERT(temp != NULL, "Invalid element specified in ElementCommandLineQuery");
    7366    return true;
  • src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp

    rd26fb7 r6a922b  
    3636#include "CodePatterns/MemDebug.hpp"
    3737
    38 #include <string>
    39 
    4038#include "CommandLineUI/Query/CommandLineQuery.hpp"
    4139#include "CommandLineUI/CommandLineParser.hpp"
     
    5351{}
    5452
    55 template <typename T>
    56 std::vector<const element *> getElementsFromInput(const std::vector<std::string> &_input)
    57 {
    58   periodentafel *periode = World::getInstance().getPeriode();
    59   std::vector<const element *> result;
    60   const element *temp_element;
    61   for (typename std::vector<std::string>::const_iterator ZRunner = _input.begin(); ZRunner != _input.end(); ++ZRunner) {
    62     const T argument = boost::lexical_cast<T>(*ZRunner);
    63     temp_element = periode->FindElement(argument);
    64     ASSERT(temp_element != NULL, "Invalid element specified in ElementCommandLineQuery");
    65     result.push_back(temp_element);
    66   }
    67   return result;
    68 }
    69 
    7053bool CommandLineDialog::ElementsCommandLineQuery::handle() {
    7154  // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector?
     55  periodentafel *periode = World::getInstance().getPeriode();
     56  std::vector<int> AllElements;
    7257  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    7358    try {
    74       std::vector<std::string> AllArguments;
    75       AllArguments = CommandLineParser::getInstance().vm[getTitle()].as< vector<std::string> >();
    76       try {
    77         temp = getElementsFromInput<int>(AllArguments);
    78       } catch(boost::bad_lexical_cast &e) {
    79         try {
    80         temp = getElementsFromInput<std::string>(AllArguments);
    81         } catch(boost::bad_lexical_cast &e) {
    82           return false;
    83         }
    84       }
     59      AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
    8560    } catch(boost::bad_any_cast &e) {
     61      AllElements.clear();
    8662      return false;
    8763    }
    88     if (temp.empty())
    89       return false;
    90     else
    91       return true;
     64    const element *temp_element;
     65    for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) {
     66      temp_element = periode->FindElement(*ZRunner);
     67      ASSERT(temp_element != NULL, "Invalid element specified in ElementCommandLineQuery");
     68      temp.push_back(temp_element);
     69    }
     70    return true;
    9271  }
    9372  return false;
  • tests/regression/Atoms/Add/post/test.in

    rd26fb7 r6a922b  
    11% Created by MoleCuilder
    22mpqc: (
    3         checkpoint = no
    43        savestate = no
    54        do_gradient = yes
  • tests/regression/Atoms/Remove/post/test.in

    rd26fb7 r6a922b  
    11% Created by MoleCuilder
    22mpqc: (
    3         checkpoint = no
    43        savestate = no
    54        do_gradient = yes
  • tests/regression/Atoms/Saturate/post/saturated_carbon.xyz

    rd26fb7 r6a922b  
    115
    2         Created by molecuilder on Wed Sep 30 19:50:39 2015, time step 0
     2        Created by molecuilder on Wed Jan 28 20:57:11 2015, time step 0
    33C       10      10      10
    4 H       11.0923 10      10
    5 H       9.63589 11.0299 10
    6 H       9.63589 9.48507 10.8919
    7 H       9.63589 9.48507 9.10811
     4H       11.076  10      10
     5H       9.64133 11.0145 10
     6H       9.64133 9.49277 10.8786
     7H       9.64133 9.49277 9.12145
  • tests/regression/Atoms/Saturate/post/saturated_nitrogen.xyz

    rd26fb7 r6a922b  
    114
    2         Created by molecuilder on Wed Sep 30 19:50:40 2015, time step 0
     2        Created by molecuilder on Wed Jan 28 21:41:39 2015, time step 0
    33N       10      10      10
    4 H       11.0015 10      10
    5 H       9.49923 10.866  10
    6 H       9.49923 9.13397 10
     4H       11.02   10      10
     5H       9.49    10.866  10
     6H       9.49    9.13397 10
  • tests/regression/Parser/Mpqc/post/doublewater.in

    rd26fb7 r6a922b  
    11% Created by MoleCuilder
    22mpqc: (
    3         checkpoint = no
    43        savestate = no
    54        do_gradient = yes
  • tests/regression/Parser/Mpqc/post/empty.in

    rd26fb7 r6a922b  
    11% Created by MoleCuilder
    22mpqc: (
    3         checkpoint = no
    43        savestate = no
    54        do_gradient = yes
  • tests/regression/Parser/Mpqc/post/test.in

    rd26fb7 r6a922b  
    11% Created by MoleCuilder
    22mpqc: (
    3         checkpoint = no
    43        savestate = no
    54        do_gradient = yes
  • tests/regression/Parser/Mpqc/post/testCLHF.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/post/testCLKS.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/post/testMBPT2.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/post/testMBPT2_R12.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testCLHF.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testCLHF_n.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testCLHF_n_ascend_ids.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testCLHF_n_mixed_ids.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testCLKS.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testMBPT2.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/testMBPT2_R12.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/Mpqc/pre/water.in

    rd26fb7 r6a922b  
    11% Created by MoleCuilder
    22mpqc: (
    3         checkpoint = no
    43        savestate = no
    54        do_gradient = yes
  • tests/regression/Parser/SetParameters/Mpqc/post/testCLHF.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
  • tests/regression/Parser/SetParameters/Mpqc/pre/testCLHF.in

    rd26fb7 r6a922b  
    11mpqc: (
    2         checkpoint = no
    32        savestate = no
    43        do_gradient = yes
Note: See TracChangeset for help on using the changeset viewer.