- Timestamp:
- Feb 3, 2011, 9:51:18 AM (14 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:
- 67c92b
- Parents:
- 9df680
- git-author:
- Frederik Heber <heber@…> (12/15/10 17:23:34)
- git-committer:
- Frederik Heber <heber@…> (02/03/11 09:51:18)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_correlation.cpp
r9df680 rea430a 28 28 #include "CodePatterns/Info.hpp" 29 29 #include "CodePatterns/Log.hpp" 30 #include "Formula.hpp" 30 31 #include "molecule.hpp" 31 32 #include "tesselation.hpp" … … 37 38 #include "World.hpp" 38 39 #include "Box.hpp" 40 41 /** Calculates the dipole angular correlation for given molecule type. 42 * Note given element order is unimportant (i.e. g(Si, O) === g(O, Si)) 43 * \param *molecules vector of molecules 44 * \param &elements vector of elements to correlate 45 * \return Map of doubles with values the pair of the two atoms. 46 */ 47 DipoleAngularCorrelationMap *DipoleAngularCorrelation(std::vector<molecule *> &molecules, const Formula &formula) 48 { 49 Info FunctionInfo(__func__); 50 DipoleAngularCorrelationMap *outmap = NULL; 51 // double distance = 0.; 52 // Box &domain = World::getInstance().getDomain(); 53 // 54 // if (molecules.empty()) { 55 // DoeLog(1) && (eLog()<< Verbose(1) <<"No molecule given." << endl); 56 // return outmap; 57 // } 58 // for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++) 59 // (*MolWalker)->doCountAtoms(); 60 // 61 // // create all possible pairs of elements 62 // set <pair<const element *,const element *> > PairsOfElements; 63 // if (elements.size() >= 2) { 64 // for (vector<const element *>::const_iterator type1 = elements.begin(); type1 != elements.end(); ++type1) 65 // for (vector<const element *>::const_iterator type2 = elements.begin(); type2 != elements.end(); ++type2) 66 // if (type1 != type2) { 67 // PairsOfElements.insert( make_pair(*type1,*type2) ); 68 // DoLog(1) && (Log() << Verbose(1) << "Creating element pair " << *(*type1) << " and " << *(*type2) << "." << endl); 69 // } 70 // } else if (elements.size() == 1) { // one to all are valid 71 // const element *elemental = *elements.begin(); 72 // PairsOfElements.insert( pair<const element *,const element*>(elemental,0) ); 73 // PairsOfElements.insert( pair<const element *,const element*>(0,elemental) ); 74 // } else { // all elements valid 75 // PairsOfElements.insert( pair<element *, element*>((element *)NULL, (element *)NULL) ); 76 // } 77 // 78 // outmap = new PairCorrelationMap; 79 // for (std::vector<molecule *>::const_iterator MolWalker = molecules.begin(); MolWalker != molecules.end(); MolWalker++){ 80 // DoLog(2) && (Log()<< Verbose(2) << "Current molecule is " << *MolWalker << "." << endl); 81 // for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 82 // DoLog(3) && (Log() << Verbose(3) << "Current atom is " << **iter << "." << endl); 83 // for (std::vector<molecule *>::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules.end(); MolOtherWalker++){ 84 // DoLog(2) && (Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl); 85 // for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) { 86 // DoLog(3) && (Log() << Verbose(3) << "Current otheratom is " << **runner << "." << endl); 87 // if ((*iter)->getId() < (*runner)->getId()){ 88 // for (set <pair<const element *, const element *> >::iterator PairRunner = PairsOfElements.begin(); PairRunner != PairsOfElements.end(); ++PairRunner) 89 // if ((PairRunner->first == (**iter).getType()) && (PairRunner->second == (**runner).getType())) { 90 // distance = domain.periodicDistance((*iter)->getPosition(),(*runner)->getPosition()); 91 // //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl; 92 // outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) ); 93 // } 94 // } 95 // } 96 // } 97 // } 98 // } 99 return outmap; 100 }; 39 101 40 102 -
src/analysis_correlation.hpp
r9df680 rea430a 33 33 34 34 class BoundaryTriangleSet; 35 class Formula; 35 36 class element; 36 37 class LinkedCell; … … 41 42 42 43 typedef multimap<double, pair<atom *, atom *> > PairCorrelationMap; 44 typedef multimap<double, pair<molecule *, molecule *> > DipoleAngularCorrelationMap; 43 45 typedef multimap<double, pair<atom *, const Vector *> > CorrelationToPointMap; 44 46 typedef multimap<double, pair<atom *, BoundaryTriangleSet *> > CorrelationToSurfaceMap; … … 47 49 /********************************************** declarations *******************************/ 48 50 51 DipoleAngularCorrelationMap *DipoleAngularCorrelation(std::vector<molecule *> &molecules, const Formula &formula); 49 52 PairCorrelationMap *PairCorrelation(std::vector<molecule *> &molecules, const std::vector<const element *> &elements); 50 53 CorrelationToPointMap *CorrelationToPoint(std::vector<molecule *> &molecules, const std::vector<const element *> &elements, const Vector *point );
Note:
See TracChangeset
for help on using the changeset viewer.