Changeset 4455f4 for src/config.cpp
- Timestamp:
- Oct 19, 2009, 1:09:29 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, Candidate_v1.7.0, 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:
- c75de1
- Parents:
- 9eefda
- File:
-
- 1 edited
-
src/config.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/config.cpp
r9eefda r4455f4 9 9 #include "element.hpp" 10 10 #include "helpers.hpp" 11 #include "molecule.hpp" 11 12 #include "memoryallocator.hpp" 12 13 #include "molecule.hpp" … … 1444 1445 bool config::SaveMPQC(const char *filename, molecule *mol) const 1445 1446 { 1446 int ElementNo = 0;1447 1447 int AtomNo; 1448 atom *Walker = NULL;1449 element *runner = NULL;1450 1448 Vector *center = NULL; 1451 1449 ofstream *output = NULL; … … 1475 1473 center = mol->DetermineCenterOfAll(output); 1476 1474 // output of atoms 1477 runner = mol->elemente->start; 1478 while (runner->next != mol->elemente->end) { // go through every element 1479 runner = runner->next; 1480 if (mol->ElementsInMolecule[runner->Z]) { // if this element got atoms 1481 ElementNo++; 1482 AtomNo = 0; 1483 Walker = mol->start; 1484 while (Walker->next != mol->end) { // go through every atom of this element 1485 Walker = Walker->next; 1486 if (Walker->type == runner) { // if this atom fits to element 1487 AtomNo++; 1488 *output << "\t\t" << Walker->type->symbol << " [ " << Walker->x.x[0]-center->x[0] << "\t" << Walker->x.x[1]-center->x[1] << "\t" << Walker->x.x[2]-center->x[2] << " ]" << endl; 1489 } 1490 } 1491 } 1492 } 1475 AtomNo = 0; 1476 mol->ActOnAllAtoms( &atom::OutputMPQCLine, output, center, &AtomNo ); 1493 1477 delete(center); 1494 1478 *output << "\t}" << endl; … … 1524 1508 center = mol->DetermineCenterOfAll(output); 1525 1509 // output of atoms 1526 runner = mol->elemente->start; 1527 while (runner->next != mol->elemente->end) { // go through every element 1528 runner = runner->next; 1529 if (mol->ElementsInMolecule[runner->Z]) { // if this element got atoms 1530 ElementNo++; 1531 AtomNo = 0; 1532 Walker = mol->start; 1533 while (Walker->next != mol->end) { // go through every atom of this element 1534 Walker = Walker->next; 1535 if (Walker->type == runner) { // if this atom fits to element 1536 AtomNo++; 1537 *output << "\t\t" << Walker->type->symbol << " [ " << Walker->x.x[0]-center->x[0] << "\t" << Walker->x.x[1]-center->x[1] << "\t" << Walker->x.x[2]-center->x[2] << " ]" << endl; 1538 } 1539 } 1540 } 1541 } 1510 AtomNo = 0; 1511 mol->ActOnAllAtoms( &atom::OutputMPQCLine, output, center, &AtomNo ); 1542 1512 delete(center); 1543 1513 *output << "\t}" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.
