Changeset 6625c3 for src/atom.cpp


Ignore:
Timestamp:
Feb 24, 2011, 5:46:46 PM (15 years ago)
Author:
Frederik Heber <heber@…>
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:
056e70
Parents:
54b42e
git-author:
Frederik Heber <heber@…> (02/24/11 11:18:59)
git-committer:
Frederik Heber <heber@…> (02/24/11 17:46:46)
Message:

Removed atom_trajectoryparticle*, replaced by AtomInfo class now having std::vector<> for trajectories.

AtomInfo:

Other changes:

  • gsl_rng_gaussian() exchanged by boost::random specific type.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom.cpp

    r54b42e r6625c3  
    5555  setPosition(pointer->getPosition()); // copy coordination
    5656  setAtomicVelocity(pointer->getAtomicVelocity()); // copy velocity
    57   FixedIon = pointer->FixedIon;
     57  setFixedIon(pointer->getFixedIon());
    5858};
    5959
     
    152152    *out << "Ion_Type" << ElementNo << "_" << AtomNo << "\t"  << fixed << setprecision(9) << showpoint;
    153153    *out << at(0) << "\t" << at(1) << "\t" << at(2);
    154     *out << "\t" << FixedIon;
     154    *out << "\t" << (int)(getFixedIon());
    155155    if (getAtomicVelocity().Norm() > MYEPSILON)
    156156      *out << "\t" << scientific << setprecision(6) << getAtomicVelocity()[0] << "\t" << getAtomicVelocity()[1] << "\t" << getAtomicVelocity()[2] << "\t";
     
    179179    *out << "Ion_Type" << elementLookup.there.find(elemental)->second << "_" << AtomNo[elemental->getAtomicNumber()] << "\t"  << fixed << setprecision(9) << showpoint;
    180180    *out << at(0) << "\t" << at(1) << "\t" << at(2);
    181     *out << "\t" << FixedIon;
     181    *out << "\t" << getFixedIon();
    182182    if (getAtomicVelocity().Norm() > MYEPSILON)
    183183      *out << "\t" << scientific << setprecision(6) << getAtomicVelocity()[0] << "\t" << getAtomicVelocity()[1] << "\t" << getAtomicVelocity()[2] << "\t";
     
    191191};
    192192
    193 /** Output of a single atom as one lin in xyz file.
     193/** Output of a single atom as one line in xyz file.
    194194 * \param *out stream to output to
    195195  * \return true - \a *out present, false - \a *out is NULL
     
    204204};
    205205
    206 /** Output of a single atom as one lin in xyz file.
     206/** Output of a single atom as one line in xyz file.
    207207 * \param *out stream to output to
    208208 * \param *ElementNo array with ion type number in the config file this atom's element shall have
     
    218218    ASSERT(elementLookup.there.find(elemental)!=elementLookup.there.end(),"Type of this atom was not in the formula upon enumeration");
    219219    *out << "Ion_Type" << elementLookup.there.find(elemental)->second << "_" << AtomNo[getType()->getAtomicNumber()] << "\t"  << fixed << setprecision(9) << showpoint;
    220     *out << Trajectory.R.at(step)[0] << "\t" << Trajectory.R.at(step)[1] << "\t" << Trajectory.R.at(step)[2];
    221     *out << "\t" << FixedIon;
    222     if (Trajectory.U.at(step).Norm() > MYEPSILON)
    223       *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step)[0] << "\t" << Trajectory.U.at(step)[1] << "\t" << Trajectory.U.at(step)[2] << "\t";
    224     if (Trajectory.F.at(step).Norm() > MYEPSILON)
    225       *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step)[0] << "\t" << Trajectory.F.at(step)[1] << "\t" << Trajectory.F.at(step)[2] << "\t";
     220    *out << getPosition(step)[0] << "\t" << getPosition(step)[1] << "\t" << getPosition(step)[2];
     221    *out << "\t" << (int)(getFixedIon());
     222    if (getAtomicVelocity(step).Norm() > MYEPSILON)
     223      *out << "\t" << scientific << setprecision(6) << getAtomicVelocity(step)[0] << "\t" << getAtomicVelocity(step)[1] << "\t" << getAtomicVelocity(step)[2] << "\t";
     224    if (getAtomicForce(step).Norm() > MYEPSILON)
     225      *out << "\t" << scientific << setprecision(6) << getAtomicForce(step)[0] << "\t" << getAtomicForce(step)[1] << "\t" << getAtomicForce(step)[2] << "\t";
    226226    *out << "\t# Number in molecule " << nr << endl;
    227227    return true;
     
    239239  if (out != NULL) {
    240240    *out << getType()->getSymbol() << "\t";
    241     *out << Trajectory.R.at(step)[0] << "\t";
    242     *out << Trajectory.R.at(step)[1] << "\t";
    243     *out << Trajectory.R.at(step)[2] << endl;
     241    *out << getPosition(step)[0] << "\t";
     242    *out << getPosition(step)[1] << "\t";
     243    *out << getPosition(step)[2] << endl;
    244244    return true;
    245245  } else
     
    383383}
    384384
    385 double atom::getMass() const{
    386   return getType()->getMass();
    387 }
    388 
    389385int atom::getNr() const{
    390386  return nr;
Note: See TracChangeset for help on using the changeset viewer.