- Timestamp:
- Jun 2, 2010, 12:22:47 PM (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:
- accebe
- Parents:
- 6ef0a4
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_correlation.cpp
r6ef0a4 r7fd416 262 262 if ((*MolWalker)->ActiveFlag) { 263 263 DoLog(1) && (Log() << Verbose(1) << "Current molecule is " << (*MolWalker)->name << "." << endl); 264 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 265 //Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 264 if ((*MolWalker)->empty()) 265 DoLog(1) && (1) && (Log() << Verbose(1) << "\t is empty." << endl); 266 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 267 DoLog(1) && (Log() << Verbose(1) << "\tCurrent atom is " << *(*iter) << "." << endl); 266 268 if ((type == NULL) || ((*iter)->type == type)) { 267 269 TriangleIntersectionList Intersections((*iter)->node,Surface,LC); … … 271 273 } 272 274 } 273 } else 275 } else { 274 276 DoLog(1) && (Log() << Verbose(1) << "molecule " << (*MolWalker)->name << " is not active." << endl); 277 } 275 278 276 279 return outmap; -
src/builder.cpp
r6ef0a4 r7fd416 1911 1911 output.close(); 1912 1912 binoutput.close(); 1913 counter = 0; 1913 1914 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) 1914 1915 (*BigFinder)->ActiveFlag = Actives[counter++]; -
src/molecule.cpp
r6ef0a4 r7fd416 963 963 sstr << (*iter)->type->symbol << (*iter)->nr+1; 964 964 (*iter)->setName(sstr.str()); 965 Log() << Verbose(3) << "Naming atom nr. " << (*iter)->nr << " " << (*iter)->getName() << "." << endl;965 DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << (*iter)->nr << " " << (*iter)->getName() << "." << endl); 966 966 i++; 967 967 } -
src/molecule_geometry.cpp
r6ef0a4 r7fd416 266 266 double * const cell_size = World::getInstance().getDomain(); 267 267 double *matrix = ReturnFullMatrixforSymmetric(cell_size); 268 double *inversematrix = InverseMatrix( cell_size);268 double *inversematrix = InverseMatrix(matrix); 269 269 double tmp; 270 270 bool flag; -
src/moleculelist.cpp
r6ef0a4 r7fd416 754 754 World::getInstance().destroyMolecule(*MolRunner); 755 755 } 756 // 0b. remove all bonds 756 // 0b. remove all bonds and construct a molecule with all atoms 757 757 molecule *mol = World::getInstance().createMolecule(); 758 758 vector <atom *> allatoms = World::getInstance().getAllAtoms(); … … 789 789 char number[MAXSTRINGSIZE]; 790 790 molecule **molecules = new molecule *[MolCount]; 791 MoleculeLeafClass *MolecularWalker = Subgraphs; 791 792 for (int i=0;i<MolCount;i++) { 793 MolecularWalker = MolecularWalker->next; 792 794 molecules[i] = World::getInstance().createMolecule(); 793 795 molecules[i]->ActiveFlag = true; … … 798 800 } 799 801 DoLog(1) && (Log() << Verbose(1) << "MolName is " << molecules[i]->name << endl); 802 for (molecule::iterator iter = MolecularWalker->Leaf->begin(); iter != MolecularWalker->Leaf->end(); ++iter) { 803 DoLog(1) && (Log() << Verbose(1) << **iter << endl); 804 } 800 805 insert(molecules[i]); 801 806 } … … 803 808 // 4b. create and fill map of which atom is associated to which connected molecule (note, counting starts at 1) 804 809 int FragmentCounter = 0; 805 int *MolMap = new int[mol->getAtomCount()]; 806 for (int i=0;i<mol->getAtomCount();i++) 807 MolMap[i] = 0; 808 MoleculeLeafClass *MolecularWalker = Subgraphs; 810 map<int, atom *> AtomToFragmentMap; 811 MolecularWalker = Subgraphs; 809 812 while (MolecularWalker->next != NULL) { 810 813 MolecularWalker = MolecularWalker->next; 811 for (molecule::const_iterator iter = MolecularWalker->Leaf->begin(); iter != MolecularWalker->Leaf->end(); ++iter) { 812 MolMap[(*iter)->GetTrueFather()->nr] = FragmentCounter+1; 814 for (molecule::iterator iter = MolecularWalker->Leaf->begin(); !MolecularWalker->Leaf->empty(); iter = MolecularWalker->Leaf->begin()) { 815 atom * Walker = *iter; 816 DoLog(1) && (Log() << Verbose(1) << "Re-linking " << Walker << "..." << endl); 817 MolecularWalker->Leaf->erase(iter); 818 molecules[FragmentCounter]->AddAtom(Walker); // counting starts at 1 813 819 } 814 820 FragmentCounter++; 815 821 } 816 817 // 4c. relocate atoms to new molecules and remove from Leafs 818 for (molecule::iterator iter = mol->begin(); !mol->empty(); iter = mol->begin()) { 819 const int count = mol->getAtomCount(); 820 if (((*iter)->nr <0) || ((*iter)->nr >= count)) { 821 DoeLog(0) && (eLog()<< Verbose(0) << "Index " << (*iter)->nr << " of atom " << **iter << " in molecule of " << count << " atoms is invalid!" << endl); 822 performCriticalExit(); 823 } 824 const int Index = MolMap[(*iter)->nr]; 825 if (Index != 0) { 826 DoLog(3) && (Log() << Verbose(3) << "Re-linking " << **iter << "..." << endl); 827 molecules[Index-1]->AddAtom((*iter)); // counting starts at 1 828 mol->erase(iter); 829 } else { 830 DoeLog(0) && (eLog()<< Verbose(0) << "Atom " << **iter << " not associated to molecule!" << endl); 831 performCriticalExit(); 832 } 833 } 822 World::getInstance().destroyMolecule(mol); 823 834 824 // 4d. we don't need to redo bonds, as they are connected subgraphs and still maintain their ListOfBonds, but we have to remove them from first..last list 835 825 // TODO: check whether this is really not needed anymore … … 841 831 } 842 832 delete(MolecularWalker); 843 delete[](MolMap);844 833 delete[](molecules); 845 834 DoLog(1) && (Log() << Verbose(1) << "I scanned " << FragmentCounter << " molecules." << endl);
Note:
See TracChangeset
for help on using the changeset viewer.