Changeset 14d4d4
- Timestamp:
- Jun 16, 2008, 2:09:27 PM (17 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- d427bd
- Parents:
- edb650
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
redb650 r14d4d4 805 805 cout << Verbose(0) << "Element list loaded successfully." << endl; 806 806 periode->Output((ofstream *)&cout); 807 } else 807 } else { 808 808 cout << Verbose(0) << "Element list loading failed." << endl; 809 return 1; 810 } 809 811 810 812 // 3. Find config file name and parse if possible -
src/moleculelist.cpp
redb650 r14d4d4 240 240 *out << endl; 241 241 // prepare output of config file 242 sprintf(FragmentName, "%s/%s%s.conf", configuration->configpath, FRAGMENTPREFIX, FragmentNumber);242 sprintf(FragmentName, "%s/%s%s.conf", PathBackup, FRAGMENTPREFIX, FragmentNumber); 243 243 outputFragment.open(FragmentName, ios::out); 244 strcpy(PathBackup, configuration->configpath);245 sprintf(FragmentName, "%s/%s%s/", configuration->configpath, FRAGMENTPREFIX, FragmentNumber);244 //strcpy(PathBackup, configuration->configpath); 245 sprintf(FragmentName, "%s/%s%s/", PathBackup, FRAGMENTPREFIX, FragmentNumber); 246 246 247 247 // center on edge -
src/molecules.cpp
redb650 r14d4d4 1573 1573 for(j=0;j<NumberOfBondsPerAtom[Walker->nr];j++) 1574 1574 NoBonds += ListOfBondsPerAtom[Walker->nr][j]->BondDegree; 1575 //*out << Verbose(3) << "Walker: " << (int)Walker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;1575 *out << Verbose(3) << "Walker: " << (int)Walker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl; 1576 1576 if ((int)(Walker->type->NoValenceOrbitals) > NoBonds) { // we have a mismatch, check NoBonds of other atom 1577 1577 // count valence of second partner … … 1579 1579 for(j=0;j<NumberOfBondsPerAtom[OtherWalker->nr];j++) 1580 1580 NoBonds += ListOfBondsPerAtom[OtherWalker->nr][j]->BondDegree; 1581 //*out << Verbose(3) << "OtherWalker: " << (int)OtherWalker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;1581 *out << Verbose(3) << "OtherWalker: " << (int)OtherWalker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl; 1582 1582 if ((int)(OtherWalker->type->NoValenceOrbitals) > NoBonds) // increase bond degree by one 1583 1583 ListOfBondsPerAtom[Walker->nr][i]->BondDegree++; … … 1591 1591 *out << Verbose(1) << "I detected " << BondCount << " bonds in the molecule with distance " << bonddistance << "." << endl; 1592 1592 1593 //// output bonds for debugging (if bond chain list was correctly installed)1594 //*out << Verbose(1) << endl << "From contents of bond chain list:";1595 //bond *Binder = first;1596 //while(Binder->next != last) {1597 //Binder = Binder->next;1598 //*out << *Binder << "\t" << endl;1599 //}1600 //*out << endl;1593 // output bonds for debugging (if bond chain list was correctly installed) 1594 *out << Verbose(1) << endl << "From contents of bond chain list:"; 1595 bond *Binder = first; 1596 while(Binder->next != last) { 1597 Binder = Binder->next; 1598 *out << *Binder << "\t" << endl; 1599 } 1600 *out << endl; 1601 1601 } else 1602 1602 *out << Verbose(1) << "AtomCount is " << AtomCount << ", thus no bonds, no connections!." << endl; … … 3131 3131 // *out << ", who has no son in this fragment molecule." << endl; 3132 3132 #ifdef ADDHYDROGEN 3133 //*out << Verbose(3) << "Adding Hydrogen to " << Runner->Name << " and a bond in between." << endl;3133 //*out << Verbose(3) << "Adding Hydrogen to " << Runner->Name << " and a bond in between." << endl; 3134 3134 Leaf->AddHydrogenReplacementAtom(out, ListOfBondsPerAtom[FatherOfRunner->nr][i], Runner, FatherOfRunner, OtherFather, ListOfBondsPerAtom[FatherOfRunner->nr],NumberOfBondsPerAtom[FatherOfRunner->nr], IsAngstroem); 3135 3135 #endif -
src/periodentafel.cpp
redb650 r14d4d4 217 217 218 218 // fill valence DB per element 219 strncat(filename, path, MAXSTRINGSIZE); 220 strncpy(filename, STANDARDVALENCEDB, MAXSTRINGSIZE-strlen(filename)); 219 strncpy(filename, path, MAXSTRINGSIZE); 220 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 221 strncat(filename, STANDARDVALENCEDB, MAXSTRINGSIZE-strlen(filename)); 221 222 infile.open(filename); 222 223 if (infile != NULL) { … … 226 227 infile >> FindElement((int)tmp)->Valence; 227 228 infile >> ws; 228 //cout << Verbose(3) << "Element " << (int)tmp << " has " << find_element((int)tmp)->Valence << " valence electrons." << endl;229 //cout << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->Valence << " valence electrons." << endl; 229 230 } 230 231 infile.close(); … … 234 235 235 236 // fill valence DB per element 236 strncat(filename, path, MAXSTRINGSIZE); 237 strncpy(filename, STANDARDORBITALDB, MAXSTRINGSIZE-strlen(filename)); 237 strncpy(filename, path, MAXSTRINGSIZE); 238 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 239 strncat(filename, STANDARDORBITALDB, MAXSTRINGSIZE-strlen(filename)); 238 240 infile.open(filename); 239 241 if (infile != NULL) { … … 243 245 infile >> FindElement((int)tmp)->NoValenceOrbitals; 244 246 infile >> ws; 245 //cout << Verbose(3) << "Element " << (int)tmp << " has " << find_element((int)tmp)->NoValenceOrbitals << " number of singly occupied valence orbitals." << endl;247 //cout << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->NoValenceOrbitals << " number of singly occupied valence orbitals." << endl; 246 248 } 247 249 infile.close(); … … 251 253 252 254 // fill H-BondDistance DB per element 253 strncat(filename, path, MAXSTRINGSIZE); 254 strncpy(filename, STANDARDHBONDDISTANCEDB, MAXSTRINGSIZE-strlen(filename)); 255 strncpy(filename, path, MAXSTRINGSIZE); 256 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 257 strncat(filename, STANDARDHBONDDISTANCEDB, MAXSTRINGSIZE-strlen(filename)); 255 258 infile.open(filename); 256 259 if (infile != NULL) { … … 263 266 infile >> ptr->HBondDistance[2]; 264 267 infile >> ws; 265 //cout << Verbose(3) << "Element " << (int)tmp << " has " << find_element((int)tmp)->HBondDistance[0] << " Angstrom typical distance to hydrogen." << endl;268 //cout << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->HBondDistance[0] << " Angstrom typical distance to hydrogen." << endl; 266 269 } 267 270 infile.close(); … … 271 274 272 275 // fill H-BondAngle DB per element 273 strncat(filename, path, MAXSTRINGSIZE); 274 strncpy(filename, STANDARDHBONDANGLEDB, MAXSTRINGSIZE-strlen(filename)); 276 strncpy(filename, path, MAXSTRINGSIZE); 277 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 278 strncat(filename, STANDARDHBONDANGLEDB, MAXSTRINGSIZE-strlen(filename)); 275 279 infile.open(filename); 276 280 if (infile != NULL) { … … 288 292 } else 289 293 otherstatus = false; 294 295 if (!otherstatus) 296 cerr << "ERROR: Something went wrong while parsing the databases!" << endl; 290 297 291 298 return status;
Note:
See TracChangeset
for help on using the changeset viewer.