Changeset 38c5d1 for src/documentation/constructs/linkedcell.dox
- Timestamp:
- Feb 22, 2012, 11:28:52 AM (13 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:
- 040a5c
- Parents:
- 712886
- git-author:
- Frederik Heber <heber@…> (01/05/12 16:51:58)
- git-committer:
- Frederik Heber <heber@…> (02/22/12 11:28:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/documentation/constructs/linkedcell.dox
r712886 r38c5d1 64 64 * The following snippet gives you access to the linked cell interface. 65 65 * \code 66 * LinkedCell_View &interface = World::getInstance().getLinkedCellView();66 LinkedCell_View &interface = World::getInstance().getLinkedCell(double distance); 67 67 * \endcode 68 * where distance is the desired edge length for the linked cell construct (e.g. 69 * the maximum distance where you want neighbors to be returned). 68 70 * 69 71 * Now, you can access its functions as simply as 70 72 * \code 71 * LinkedList &list = interface.getAllNeighbours(Vector(0.,0.,0.), 4.);73 LinkedList &list = interface.getAllNeighbours(4., Vector(0.,0.,0.)); 72 74 * \endcode 73 75 * which returns a LinkedList, i.e. a set of points, that reside in a sphere … … 75 77 * current in the Box stored in the World: 76 78 * \code 77 *World::getInstance().getDomain()79 World::getInstance().getDomain() 78 80 * \endcode 79 81 * 82 * You can iterate over the LinkedList as follows: 83 * \code 84 if (!ListOfNeighbors.empty()) { 85 // we have some possible candidates, go through each 86 for (LinkedCell::LinkedList::const_iterator neighboriter = ListOfNeighbors.begin(); 87 neighboriter != ListOfNeighbors.end(); 88 ++neighboriter) { 89 const atom * const OtherWalker = dynamic_cast<const atom *>(*neighboriter); 90 ASSERT(OtherWalker != NULL, 91 "__func__ - TesselPoint " 92 +(*neighboriter)->getName()+" that was not an atom retrieved from LinkedList"); 93 ... 94 95 } 96 } 97 * \endcode 98 * Note that we dynamically cast the TesselPoint to its more involved class atom which is 99 * in general ok as only atoms are contained in LinkedCell constructs. 80 100 * 81 101 * \date 2011-11-30
Note:
See TracChangeset
for help on using the changeset viewer.