Changeset 957c42 for src/atom.cpp
- Timestamp:
- Feb 25, 2010, 11:15:22 AM (15 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:
- 5a7243
- Parents:
- 0188ea (diff), 244d26 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/atom.cpp
r0188ea r957c42 20 20 /** Constructor of class atom. 21 21 */ 22 atom::atom() : previous(NULL), next(NULL), father(this), sort(&nr)23 { 24 World::get()->registerAtom(this); 22 atom::atom() : 23 previous(NULL), next(NULL), father(this), sort(&nr) 24 { 25 25 node = &x; // TesselPoint::x can only be referenced from here 26 26 }; … … 28 28 /** Constructor of class atom. 29 29 */ 30 atom::atom(atom *pointer) : previous(NULL), next(NULL), father(pointer), sort(&nr) 31 { 32 World::get()->registerAtom(this); 30 atom::atom(atom *pointer) : 31 ParticleInfo(pointer), 32 previous(NULL), next(NULL), father(pointer), sort(&nr) 33 { 33 34 type = pointer->type; // copy element of atom 34 35 x.CopyVector(&pointer->x); // copy coordination … … 38 39 }; 39 40 41 atom *atom::clone(){ 42 atom *res = new atom(); 43 res->previous=0; 44 res->next=0; 45 res->father = this; 46 res->sort = &nr; 47 res->type = type; 48 res->x.CopyVector(&this->x); 49 res->v.CopyVector(&this->v); 50 res->FixedIon = FixedIon; 51 res->node = &x; 52 World::get()->registerAtom(res); 53 return res; 54 } 55 40 56 41 57 /** Destructor of class atom. … … 43 59 atom::~atom() 44 60 { 45 World::get()->unregisterAtom(this);46 61 unlink(this); 47 62 }; … … 267 282 }; 268 283 284 World *atom::getWorld(){ 285 return world; 286 } 287 288 void atom::setWorld(World* _world){ 289 world = _world; 290 } 291 292 void atom::setId(int _id) { 293 id=_id; 294 } 295 296 int atom::getId() { 297 return id; 298 } 299 300 atom* NewAtom(){ 301 return new atom(); 302 } 303 304 void DeleteAtom(atom* atom){ 305 delete atom; 306 }
Note:
See TracChangeset
for help on using the changeset viewer.