Changeset 2034f3 for src/Atom


Ignore:
Timestamp:
Apr 5, 2012, 3:55:48 PM (13 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, 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:
259887
Parents:
3d0892
git-author:
Frederik Heber <heber@…> (03/27/12 12:37:05)
git-committer:
Frederik Heber <heber@…> (04/05/12 15:55:48)
Message:

Added AtomInfo::charge along with getter and setter.

Location:
src/Atom
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Atom/AtomicInfo.cpp

    r3d0892 r2034f3  
    3333AtomicInfo::AtomicInfo() :
    3434    Type(NULL),
     35    charge(0.),
    3536    FatherId(0),
    3637    MolId(0),
     
    4142    Position(_atom.getPosition()),
    4243    Type(_atom.getType()),
     44    charge(_atom.getCharge()),
    4345    Velocity(_atom.getAtomicVelocity()),
    4446    FatherId(_atom.father->getId()),
     
    5658  _atom.setPosition(Position);
    5759  _atom.setType(Type);
     60  _atom.setCharge(charge);
    5861  _atom.setAtomicVelocity(Velocity);
    5962
  • src/Atom/AtomicInfo.hpp

    r3d0892 r2034f3  
    3737  Vector Position;
    3838  const element * Type;
     39  double charge;
    3940  Vector Velocity;
    4041  atomId_t FatherId;
  • src/Atom/atom_atominfo.cpp

    r3d0892 r2034f3  
    3737AtomInfo::AtomInfo() :
    3838  AtomicElement(0),
    39   FixedIon(false)
     39  FixedIon(false),
     40  charge(0.)
    4041{
    4142  AtomicPosition.reserve(1);
     
    5354    AtomicPosition(_atom.AtomicPosition),
    5455    AtomicElement(_atom.AtomicElement),
    55     FixedIon(false)
     56    FixedIon(_atom.FixedIon),
     57    charge(_atom.charge)
    5658{
    5759  AtomicVelocity.reserve(1);
     
    6365AtomInfo::AtomInfo(const VectorInterface &_v) :
    6466    AtomicElement(-1),
    65     FixedIon(false)
     67    FixedIon(false),
     68    charge(0.)
    6669{
    6770  AtomicPosition[0] = _v.getPosition();
  • src/Atom/atom_atominfo.hpp

    r3d0892 r2034f3  
    271271  Vector getMomentum(const unsigned int step) const;
    272272  double getMass() const;
     273  double getCharge() const {
     274    return charge;
     275  }
     276  void setCharge(const double _charge) {
     277    charge = _charge;
     278  }
    273279
    274280  std::ostream & operator << (std::ostream &ost) const;
     
    288294private:
    289295  atomicNumber_t AtomicElement;          //!< contains atomic number (i.e. Z of element) or "-1" if unset
    290   bool FixedIon;
     296  bool FixedIon;    //!< whether this nuclei is influenced by force integration or not
     297  double charge;    //!< charge of this nuclei
    291298};
    292299
Note: See TracChangeset for help on using the changeset viewer.