• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision6de33cc276c8c726fb41a96149424f51a55163fd (tree)
Time2012-11-09 13:07:57
AuthorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

input module for the initial electronic eigenstate for NASCO is implemented. #28791

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1112 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

Incremental Difference

--- a/src/base/InputParser.cpp
+++ b/src/base/InputParser.cpp
@@ -87,6 +87,8 @@ void InputParser::SetMessages(){
8787 = "Error in base::InputParser::ValidateNascoConditions: Theory you set is not supported for NASCO.\n";
8888 this->errorMessageNonValidNumberExcitedStatesNASCO
8989 = "Error in base::InputParser::ValidateNascoConditions: The Number of electronic states of NASCO should be not over the number of CIS excited states plus 1.\n";
90+ this->errorMessageNonValidInitialElectronicStateNASCO
91+ = "Error in base::InputParser::ValidateNascoConditions: The initial electronic states for NASCO should be set to one of the electronic eigenstates used in NASCO.\n";
9092 this->errorMessageNonValidExcitedStatesOptimization
9193 = "Error in base::InputParser::ValidateOptimizationConditions: Excited state on which optimization is carried out or CIS condition are wrong.\n";
9294 this->errorMessageNonValidElectronicStateFrequencies
@@ -98,6 +100,7 @@ void InputParser::SetMessages(){
98100 this->errorMessageTheory = "Theory: ";
99101 this->errorMessageNumberExcitedStateCIS = "Number of CIS excited states: ";
100102 this->errorMessageNumberElectronicStatesNASCO = "Number of electronic states for NASCO: ";
103+ this->errorMessageInitialElectronicStateNASCO = "Initial electronic state for NASCO: ";
101104 this->messageStartParseInput = "********** START: Parse input **********\n";
102105 this->messageDoneParseInput = "********** DONE: Parse input ***********\n\n\n";
103106 this->messageTotalNumberAOs = "\tTotal number of valence AOs: ";
@@ -160,11 +163,12 @@ void InputParser::SetMessages(){
160163 this->messageRpmdSeed = "\t\tSeed: ";
161164
162165 // NASCO
163- this->messageNascoConditions = "\tNasco conditions:\n";
164- this->messageNascoTotalSteps = "\t\tTotal steps: ";
165- this->messageNascoNumElecStates = "\t\tNumber of the electronic eigenstates: ";
166- this->messageNascoTimeWidth = "\t\tTime width: ";
167- this->messageNascoSeed = "\t\tSeed: ";
166+ this->messageNascoConditions = "\tNasco conditions:\n";
167+ this->messageNascoTotalSteps = "\t\tTotal steps: ";
168+ this->messageNascoNumElecStates = "\t\tNumber of the electronic eigenstates: ";
169+ this->messageNascoInitialElecState = "\t\tInitial electronic eigenstate: ";
170+ this->messageNascoTimeWidth = "\t\tTime width: ";
171+ this->messageNascoSeed = "\t\tSeed: ";
168172
169173 // Optimization
170174 this->messageOptimizationConditions = "\tOptimization conditions:\n";
@@ -336,12 +340,13 @@ void InputParser::SetMessages(){
336340 this->stringRPMDSeed = "seed";
337341
338342 // NASCO
339- this->stringNASCO = "nasco";
340- this->stringNASCOEnd = "nasco_end";
341- this->stringNASCOTotalSteps = "total_steps";
342- this->stringNASCONumElecStates = "num_electronic_states";
343- this->stringNASCOTimeWidth = "dt";
344- this->stringNASCOSeed = "seed";
343+ this->stringNASCO = "nasco";
344+ this->stringNASCOEnd = "nasco_end";
345+ this->stringNASCOTotalSteps = "total_steps";
346+ this->stringNASCONumElecStates = "num_electronic_states";
347+ this->stringNASCOInitialElecState = "initial_electronic_state";
348+ this->stringNASCOTimeWidth = "dt";
349+ this->stringNASCOSeed = "seed";
345350
346351 // Opt
347352 this->stringOptimization = "optimization";
@@ -940,6 +945,12 @@ int InputParser::ParseConditionsNASCO(vector<string>* inputTerms, int parseIndex
940945 Parameters::GetInstance()->SetNumberElectronicStatesNASCO(numElecStates);
941946 parseIndex++;
942947 }
948+ // initial electronic eigenstates for NASCO.
949+ if((*inputTerms)[parseIndex].compare(this->stringNASCOInitialElecState) == 0){
950+ int initElecState = atoi((*inputTerms)[parseIndex+1].c_str());
951+ Parameters::GetInstance()->SetInitialElectronicStateNASCO(initElecState);
952+ parseIndex++;
953+ }
943954 // time width for NASCO.
944955 if((*inputTerms)[parseIndex].compare(this->stringNASCOTimeWidth) == 0){
945956 double timeWidth = atof((*inputTerms)[parseIndex+1].c_str()) * Parameters::GetInstance()->GetFs2AU();
@@ -1408,6 +1419,16 @@ void InputParser::ValidateNascoConditions(const Molecule& molecule) const{
14081419 ss << this->errorMessageNumberExcitedStateCIS << numberExcitedStatesCIS << endl;
14091420 throw MolDSException(ss.str());
14101421 }
1422+ // Validate initial electronic eigenstate
1423+ int initialElectronicStateNASCO = Parameters::GetInstance()->GetInitialElectronicStateNASCO();
1424+ int numberElectronicStatesNASCO = Parameters::GetInstance()->GetNumberElectronicStatesNASCO();
1425+ if(numberElectronicStatesNASCO<=initialElectronicStateNASCO){
1426+ stringstream ss;
1427+ ss << this->errorMessageNonValidInitialElectronicStateNASCO;
1428+ ss << this->errorMessageNumberElectronicStatesNASCO << numberElectronicStatesNASCO << endl;
1429+ ss << this->errorMessageInitialElectronicStateNASCO << initialElectronicStateNASCO << endl;
1430+ throw MolDSException(ss.str());
1431+ }
14111432 }
14121433
14131434 void InputParser::ValidateOptimizationConditions(const Molecule& molecule) const{
@@ -1613,6 +1634,8 @@ void InputParser::OutputNascoConditions() const{
16131634 % Parameters::GetInstance()->GetTotalStepsNASCO());
16141635 this->OutputLog(boost::format("%s%d\n") % this->messageNascoNumElecStates.c_str()
16151636 % Parameters::GetInstance()->GetNumberElectronicStatesNASCO());
1637+ this->OutputLog(boost::format("%s%d\n") % this->messageNascoInitialElecState.c_str()
1638+ % Parameters::GetInstance()->GetInitialElectronicStateNASCO());
16161639 this->OutputLog(boost::format("%s%lf%s\n") % this->messageNascoTimeWidth.c_str()
16171640 % (Parameters::GetInstance()->GetTimeWidthNASCO()/Parameters::GetInstance()->GetFs2AU())
16181641 % this->messageFs.c_str());
--- a/src/base/InputParser.h
+++ b/src/base/InputParser.h
@@ -39,6 +39,7 @@ private:
3939 std::string errorMessageNonValidExcitedStatesRPMD;
4040 std::string errorMessageNonValidTheoriesNASCO;
4141 std::string errorMessageNonValidNumberExcitedStatesNASCO;
42+ std::string errorMessageNonValidInitialElectronicStateNASCO;
4243 std::string errorMessageNonValidExcitedStatesOptimization;
4344 std::string errorMessageNonValidElectronicStateFrequencies;
4445 std::string errorMessageNonValidTheoryFrequencies;
@@ -47,6 +48,7 @@ private:
4748 std::string errorMessageTheory;
4849 std::string errorMessageNumberExcitedStateCIS;
4950 std::string errorMessageNumberElectronicStatesNASCO;
51+ std::string errorMessageInitialElectronicStateNASCO;
5052 std::string messageStartParseInput;
5153 std::string messageDoneParseInput;
5254 std::string messageTotalNumberAOs;
@@ -105,6 +107,7 @@ private:
105107 std::string messageNascoConditions;
106108 std::string messageNascoTotalSteps;
107109 std::string messageNascoNumElecStates;
110+ std::string messageNascoInitialElecState;
108111 std::string messageNascoTimeWidth;
109112 std::string messageNascoSeed;
110113 // Optimization
@@ -261,6 +264,7 @@ private:
261264 std::string stringNASCOEnd;
262265 std::string stringNASCOTotalSteps;
263266 std::string stringNASCONumElecStates;
267+ std::string stringNASCOInitialElecState;
264268 std::string stringNASCOTimeWidth;
265269 std::string stringNASCOSeed;
266270 // Optimization
--- a/src/base/Parameters.cpp
+++ b/src/base/Parameters.cpp
@@ -186,6 +186,7 @@ void Parameters::SetDefaultValues(){
186186 this->seedRPMD = static_cast<unsigned long>(time(0));
187187 // NASCO
188188 this->numberElectronicStatesNASCO = 3;
189+ this->initialElectronicStateNASCO = 0;
189190 this->totalStepsNASCO = 10;
190191 this->timeWidthNASCO = 0.1*this->fs2AU;
191192 this->seedNASCO = static_cast<unsigned long>(time(0));
@@ -821,6 +822,14 @@ void Parameters::SetNumberElectronicStatesNASCO(int numberElectronicStates){
821822 this->numberElectronicStatesNASCO = numberElectronicStates;
822823 }
823824
825+int Parameters::GetInitialElectronicStateNASCO() const{
826+ return this->initialElectronicStateNASCO;
827+}
828+
829+void Parameters::SetInitialElectronicStateNASCO(int initialElectronicState){
830+ this->initialElectronicStateNASCO = initialElectronicState;
831+}
832+
824833 double Parameters::GetTimeWidthNASCO() const{
825834 return this->timeWidthNASCO;
826835 }
--- a/src/base/Parameters.h
+++ b/src/base/Parameters.h
@@ -178,6 +178,8 @@ public:
178178 void SetTotalStepsNASCO(int totalSteps);
179179 int GetNumberElectronicStatesNASCO() const;
180180 void SetNumberElectronicStatesNASCO(int NumberElectronicStates);
181+ int GetInitialElectronicStateNASCO() const;
182+ void SetInitialElectronicStateNASCO(int initialElectronicState);
181183 unsigned long GetSeedNASCO() const;
182184 void SetSeedNASCO(unsigned long seed);
183185 double GetTimeWidthNASCO() const;
@@ -296,6 +298,7 @@ private:
296298 // NASCO
297299 int totalStepsNASCO;
298300 int numberElectronicStatesNASCO;
301+ int initialElectronicStateNASCO;
299302 double timeWidthNASCO;
300303 unsigned long seedNASCO;
301304 // Optimization