Changeset 49f802c for src/atom.cpp
- Timestamp:
- Oct 9, 2009, 11:57:41 AM (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:
- c111db
- Parents:
- f66195
- File:
-
- 1 edited
-
src/atom.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/atom.cpp
rf66195 r49f802c 222 222 { 223 223 if (out != NULL) { 224 *out << Verbose(4) << "Atom " << Name << "/" << nr << " with " << NumberOfBondsPerAtom[nr] << " bonds: "; 225 int TotalDegree = 0; 226 for (int j=0;j<NumberOfBondsPerAtom[nr];j++) { 227 *out << *ListOfBondsPerAtom[nr][j] << "\t"; 228 TotalDegree += ListOfBondsPerAtom[nr][j]->BondDegree; 224 #ifdef ADDHYDROGEN 225 if (type->Z != 1) { // regard only non-hydrogen 226 #endif 227 *out << Verbose(4) << "Atom " << Name << "/" << nr << " with " << NumberOfBondsPerAtom[nr] << " bonds: "; 228 int TotalDegree = 0; 229 for (int j=0;j<NumberOfBondsPerAtom[nr];j++) { 230 *out << *ListOfBondsPerAtom[nr][j] << "\t"; 231 TotalDegree += ListOfBondsPerAtom[nr][j]->BondDegree; 232 } 233 *out << " -- TotalDegree: " << TotalDegree << endl; 234 #ifdef ADDHYDROGEN 229 235 } 230 *out << " -- TotalDegree: " << TotalDegree << endl; 236 #endif 231 237 return true; 232 238 } else … … 258 264 }; 259 265 266 /** Returns squared distance to a given vector. 267 * \param origin vector to calculate distance to 268 * \return distance squared 269 */ 270 double atom::DistanceSquaredToVector(Vector &origin) 271 { 272 return origin.DistanceSquared(&x); 273 }; 274 275 /** Adds kinetic energy of this atom to given temperature value. 276 * \param *temperature add on this value 277 * \param step given step of trajectory to add 278 */ 279 void atom::AddKineticToTemperature(double *temperature, int step) const 280 { 281 for (int i=NDIM;i--;) 282 *temperature += type->mass * Trajectory.U.at(step).x[i]* Trajectory.U.at(step).x[i]; 283 }; 284 285 /** Returns distance to a given vector. 286 * \param origin vector to calculate distance to 287 * \return distance 288 */ 289 double atom::DistanceToVector(Vector &origin) 290 { 291 return origin.Distance(&x); 292 }; 293 260 294 bool operator < (atom &a, atom &b) 261 295 {
Note:
See TracChangeset
for help on using the changeset viewer.
