- Timestamp:
- Sep 28, 2008, 5:55:04 PM (16 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:
- ba4432
- Parents:
- 62f793
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analyzer.cpp
r62f793 raa5702 116 116 if (!ForceFragments.ParseFragmentMatrix(argv[1], dir, ForceFragmentSuffix,0,0)) return 1; 117 117 if (periode != NULL) { // also look for PAS values 118 if (!ShieldingFragments.ParseFragmentMatrix(argv[1], dir, Shielding Suffix, 1, 0)) return 1;119 if (!ShieldingPASFragments.ParseFragmentMatrix(argv[1], dir, ShieldingPAS Suffix, 1, 0)) return 1;118 if (!ShieldingFragments.ParseFragmentMatrix(argv[1], dir, ShieldingFragmentSuffix, 1, 0)) return 1; 119 if (!ShieldingPASFragments.ParseFragmentMatrix(argv[1], dir, ShieldingPASFragmentSuffix, 1, 0)) return 1; 120 120 } 121 121 … … 211 211 output2.close(); 212 212 213 213 // +++++++++++++++++++++++++++++++++++++++ Plotting shieldings 214 if (periode != NULL) { // also look for PAS values 215 if (!OpenOutputFile(output, argv[3], "ShieldingPAS-Atom.dat" )) return false; 216 output << "#" << ShieldingPAS.Header << endl; 217 for(int j=0;j<ShieldingPAS.RowCounter[ShieldingPAS.MatrixCounter];j++) { 218 for(int k=0;k<ShieldingPAS.ColumnCounter;k++) 219 output << scientific << ShieldingPAS.Matrix[ ShieldingPAS.MatrixCounter ][j][k]*(((k>1) && (k<6))? 1.e6 : 1.) << "\t"; 220 output << endl; 221 } 222 output << endl << endl; // another two newlines to partition the data 223 for(int j=0;j<ShieldingPASFragments.RowCounter[ShieldingPASFragments.MatrixCounter];j++) { 224 for(int k=0;k<ShieldingPASFragments.ColumnCounter;k++) 225 output << scientific << ShieldingPASFragments.Matrix[ ShieldingPASFragments.MatrixCounter ][j][k]*(((k>1) && (k<6))? 1.e6 : 1.) << "\t"; 226 output << endl; 227 } 228 output << endl; 229 } 230 output.close(); 231 232 214 233 // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in energy to full QM 215 234 if (!CreateDataDeltaEnergyOrder(Energy, EnergyFragments, KeySet, argv[3], "DeltaEnergies-Order", "Plot of error between approximated and full energies energies versus the Bond Order", datum)) return 1; … … 359 378 if (!CreatePlotOrder(ForceFragments, KeySet, argv[3], "MaxForces-FragmentOrder", 5, "below", "y", "set boxwidth 0.2", 1, 1, "bond order", "maximum of approximated forces [Ht/a.u.]", Orderxrange.str().c_str(), yrange.str().c_str(), "1" , "with boxes fillcolor", BoxesForcePlotLine)) return 1; 360 379 380 // +++++++++++++++++++++++++++++++=Ploting approximated and true shielding for each atom 381 if (periode != NULL) { // also look for PAS values 382 if(!OpenOutputFile(output, argv[3], "ShieldingPAS-Atom.pyx")) return 1; 383 CreatePlotHeader(output, "ShieldingPAS-Atom", 1, "top right", NULL, NULL, 1, 5, "nuclei index", "chemical shielding value [ppm]"); 384 output << "plot \\" << endl; 385 output << "'ShieldingPAS-Atom.dat' index 0 title 'DFT' using 2:6 with linespoints, \\" << endl; 386 output << "'ShieldingPAS-Atom.dat' index 1 title 'BOSSANOVA' using 2:6 with linespoints" << endl; 387 output.close(); 388 } 389 361 390 // create Makefile 362 391 if(!OpenOutputFile(output, argv[3], "Makefile")) return 1; -
src/config.cpp
r62f793 raa5702 63 63 UseAddGramSch=1; 64 64 Seed=1; 65 66 65 MaxOuterStep=0; 67 Deltat= 1;66 Deltat=0.01; 68 67 OutVisStep=10; 69 68 OutSrcStep=5; -
src/molecules.cpp
r62f793 raa5702 1493 1493 string token; 1494 1494 stringstream item; 1495 double a, IonMass, Vector[NDIM], ConstrainedPotentialEnergy, ActualTemp = 0.;1495 double a, IonMass, Vector[NDIM], ConstrainedPotentialEnergy, ActualTemp; 1496 1496 ForceMatrix Force; 1497 1497 … … 1535 1535 while (walker->next != end) { // go through every atom of this element 1536 1536 walker = walker->next; 1537 a = configuration.Deltat*0.5/walker->type->mass; // (F+F_old)/2m = a and thus: v = (F+F_old)/2m * t = (F + F_old) * a1537 //a = configuration.Deltat*0.5/walker->type->mass; // (F+F_old)/2m = a and thus: v = (F+F_old)/2m * t = (F + F_old) * a 1538 1538 // check size of vectors 1539 1539 if (Trajectories[walker].R.size() <= (unsigned int)(MDSteps)) { … … 1546 1546 // Update R (and F) 1547 1547 for (int d=0; d<NDIM; d++) { 1548 Trajectories[walker].F.at(MDSteps).x[d] = -Force.Matrix[0][ AtomNo][d+5]*(configuration.GetIsAngstroem() ? AtomicLengthToAngstroem : 1.);1548 Trajectories[walker].F.at(MDSteps).x[d] = -Force.Matrix[0][walker->nr][d+5]*(configuration.GetIsAngstroem() ? AtomicLengthToAngstroem : 1.); 1549 1549 Trajectories[walker].R.at(MDSteps).x[d] = Trajectories[walker].R.at(MDSteps-1).x[d]; 1550 Trajectories[walker].R.at(MDSteps).x[d] += configuration.Deltat*(Trajectories[walker].U.at(MDSteps-1).x[d]); 1551 Trajectories[walker].R.at(MDSteps).x[d] += configuration.Deltat*a*(Trajectories[walker].F.at(MDSteps).x[d]); // F = m * a and s = 0.5 * F/m * t^2 = F * a * t1550 Trajectories[walker].R.at(MDSteps).x[d] += configuration.Deltat*(Trajectories[walker].U.at(MDSteps-1).x[d]); // s(t) = s(0) + v * deltat + 1/2 a * deltat^2 1551 Trajectories[walker].R.at(MDSteps).x[d] += 0.5*configuration.Deltat*configuration.Deltat*(Trajectories[walker].F.at(MDSteps).x[d]/walker->type->mass); // F = m * a and s = 0.5 * F/m * t^2 = F * a * t 1552 1552 } 1553 1553 // Update U 1554 1554 for (int d=0; d<NDIM; d++) { 1555 1555 Trajectories[walker].U.at(MDSteps).x[d] = Trajectories[walker].U.at(MDSteps-1).x[d]; 1556 Trajectories[walker].U.at(MDSteps).x[d] += a * (Trajectories[walker].F.at(MDSteps).x[d]+Trajectories[walker].F.at(MDSteps-1).x[d]);1556 Trajectories[walker].U.at(MDSteps).x[d] += configuration.Deltat * (Trajectories[walker].F.at(MDSteps).x[d]+Trajectories[walker].F.at(MDSteps-1).x[d]/walker->type->mass); // v = F/m * t 1557 1557 } 1558 1558 // out << "Integrated position&velocity of step " << (MDSteps) << ": ("; … … 1578 1578 } 1579 1579 } 1580 for(int d=0;d<NDIM;d++) 1581 Vector[d] /= IonMass; 1582 ActualTemp = 0.; 1580 1583 walker = start; 1581 1584 while (walker->next != end) { // go through every atom of this element 1582 1585 walker = walker->next; 1583 1586 for(int d=0;d<NDIM;d++) { 1584 Trajectories[walker].U.at(MDSteps).x[d] -= Vector[d] *walker->type->mass/IonMass;1587 Trajectories[walker].U.at(MDSteps).x[d] -= Vector[d]; 1585 1588 ActualTemp += 0.5 * walker->type->mass * Trajectories[walker].U.at(MDSteps).x[d] * Trajectories[walker].U.at(MDSteps).x[d]; 1586 1589 }
Note:
See TracChangeset
for help on using the changeset viewer.