Changeset 0a4f7f for src/builder.cpp


Ignore:
Timestamp:
Apr 7, 2010, 3:45:38 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
72e7fa
Parents:
f9352d
Message:

Made data internal data-structure of vector class private

  • Replaced occurences of access to internals with operator
  • moved Vector-class into LinAlg-Module
  • Reworked Vector to allow clean modularization
  • Added Plane class to describe arbitrary planes in 3d space
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    rf9352d r0a4f7f  
    14871487                  Log() << Verbose(2) << "found element " << first->type->name << endl;
    14881488                for (int i=NDIM;i--;)
    1489                   first->x.x[i] = atof(argv[argptr+1+i]);
     1489                  first->x[i] = atof(argv[argptr+1+i]);
    14901490                if (first->type != NULL) {
    14911491                  mol->AddAtom(first);  // add to molecule
     
    18371837                Log() << Verbose(1) << "Translating all ions by given vector." << endl;
    18381838                for (int i=NDIM;i--;)
    1839                   x.x[i] = atof(argv[argptr+i]);
     1839                  x[i] = atof(argv[argptr+i]);
    18401840                mol->Translate((const Vector *)&x);
    18411841                argptr+=3;
     
    18531853                Log() << Verbose(1) << "Translating all ions periodically by given vector." << endl;
    18541854                for (int i=NDIM;i--;)
    1855                   x.x[i] = atof(argv[argptr+i]);
     1855                  x[i] = atof(argv[argptr+i]);
    18561856                mol->TranslatePeriodically((const Vector *)&x);
    18571857                argptr+=3;
     
    18751875                for (int i=0;i<NDIM;i++) {
    18761876                  j += i+1;
    1877                   x.x[i] = atof(argv[NDIM+i]);
     1877                  x[i] = atof(argv[NDIM+i]);
    18781878                  mol->cell_size[j]*=factor[i];
    18791879                }
     
    19361936                for (int i=0;i<NDIM;i++) {
    19371937                  j += i+1;
    1938                   x.x[i] = atof(argv[argptr+i]);
    1939                   mol->cell_size[j] += x.x[i]*2.;
     1938                  x[i] = atof(argv[argptr+i]);
     1939                  mol->cell_size[j] += x[i]*2.;
    19401940                }
    19411941                mol->Translate((const Vector *)&x);
     
    20942094                    x.Zero();
    20952095                    y.Zero();
    2096                     y.x[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
     2096                    y[abs(axis)-1] = mol->cell_size[(abs(axis) == 2) ? 2 : ((abs(axis) == 3) ? 5 : 0)] * abs(axis)/axis; // last term is for sign, first is for magnitude
    20972097                    for (int i=1;i<faktor;i++) {  // then add this list with respective translation factor times
    20982098                      x.AddVector(&y); // per factor one cell width further
Note: See TracChangeset for help on using the changeset viewer.