Changeset e138de for src/molecule.hpp
- Timestamp:
- Nov 4, 2009, 7:56:04 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:
- 1614174, e5ad5c
- Parents:
- 7326b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule.hpp
r7326b2 re138de 106 106 107 107 // re-definition of virtual functions from PointCloud 108 Vector *GetCenter( ofstream *out) const ;108 Vector *GetCenter() const ; 109 109 TesselPoint *GetPoint() const ; 110 110 TesselPoint *GetTerminalPoint() const ; … … 195 195 atom * AddCopyAtom(atom *pointer); 196 196 bool AddXYZFile(string filename); 197 bool AddHydrogenReplacementAtom( ofstream *out,bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem);197 bool AddHydrogenReplacementAtom(bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem); 198 198 bond * AddBond(atom *first, atom *second, int degree = 1); 199 199 bool RemoveBond(bond *pointer); … … 205 205 206 206 /// Count and change present atoms' coordination. 207 void CountAtoms( ofstream *out);207 void CountAtoms(); 208 208 void CountElements(); 209 209 void CalculateOrbitals(class config &configuration); 210 bool CenterInBox( ofstream *out);211 bool BoundInBox( ofstream *out);212 void CenterEdge( ofstream *out,Vector *max);213 void CenterOrigin( ofstream *out);214 void CenterPeriodic( ofstream *out);215 void CenterAtVector( ofstream *out,Vector *newcenter);210 bool CenterInBox(); 211 bool BoundInBox(); 212 void CenterEdge(Vector *max); 213 void CenterOrigin(); 214 void CenterPeriodic(); 215 void CenterAtVector(Vector *newcenter); 216 216 void Translate(const Vector *x); 217 217 void TranslatePeriodically(const Vector *trans); … … 220 220 void Scale(const double ** const factor); 221 221 void DeterminePeriodicCenter(Vector ¢er); 222 Vector * DetermineCenterOfGravity( ofstream *out);223 Vector * DetermineCenterOfAll( ofstream *out) const;222 Vector * DetermineCenterOfGravity(); 223 Vector * DetermineCenterOfAll() const; 224 224 void SetNameFromFilename(const char *filename); 225 225 void SetBoxDimension(Vector *dim); 226 void ScanForPeriodicCorrection( ofstream *out);227 bool VerletForceIntegration( ofstream *out,char *file, config &configuration);226 void ScanForPeriodicCorrection(); 227 bool VerletForceIntegration(char *file, config &configuration); 228 228 void Thermostats(config &configuration, double ActualTemp, int Thermostat); 229 void PrincipalAxisSystem( ofstream *out,bool DoRotate);230 double VolumeOfConvexEnvelope( ofstream *out,bool IsAngstroem);231 232 double ConstrainedPotential( ofstream *out,struct EvaluatePotential &Params);233 double MinimiseConstrainedPotential( ofstream *out,atom **&permutation, int startstep, int endstep, bool IsAngstroem);234 void EvaluateConstrainedForces( ofstream *out,int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);235 bool LinearInterpolationBetweenConfiguration( ofstream *out,int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity);229 void PrincipalAxisSystem(bool DoRotate); 230 double VolumeOfConvexEnvelope(bool IsAngstroem); 231 232 double ConstrainedPotential(struct EvaluatePotential &Params); 233 double MinimiseConstrainedPotential(atom **&permutation, int startstep, int endstep, bool IsAngstroem); 234 void EvaluateConstrainedForces(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force); 235 bool LinearInterpolationBetweenConfiguration(int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity); 236 236 237 237 bool CheckBounds(const Vector *x) const; … … 239 239 240 240 /// Initialising routines in fragmentation 241 void CreateAdjacencyListFromDbondFile( ofstream *out,ifstream *output);242 void CreateAdjacencyList( ofstream *out,double bonddistance, bool IsAngstroem, void (BondGraph::*f)(BondedParticle * const , BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL);243 int CorrectBondDegree( ofstream *out) const;244 void OutputBondsList( ofstream *out) const;241 void CreateAdjacencyListFromDbondFile(ifstream *output); 242 void CreateAdjacencyList(double bonddistance, bool IsAngstroem, void (BondGraph::*f)(BondedParticle * const , BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL); 243 int CorrectBondDegree() const; 244 void OutputBondsList() const; 245 245 void CyclicBondAnalysis() const; 246 void OutputGraphInfoPerAtom( ofstream *out) const;247 void OutputGraphInfoPerBond( ofstream *out) const;246 void OutputGraphInfoPerAtom() const; 247 void OutputGraphInfoPerBond() const; 248 248 249 249 250 250 // Graph analysis 251 MoleculeLeafClass * DepthFirstSearchAnalysis( ofstream *out,class StackClass<bond *> *&BackEdgeStack) const;252 void CyclicStructureAnalysis( ofstream *out,class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize) const;253 bool PickLocalBackEdges( ofstream *out,atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const;251 MoleculeLeafClass * DepthFirstSearchAnalysis(class StackClass<bond *> *&BackEdgeStack) const; 252 void CyclicStructureAnalysis(class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize) const; 253 bool PickLocalBackEdges(atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const; 254 254 bond * FindNextUnused(atom *vertex) const; 255 255 void SetNextComponentNumber(atom *vertex, int nr) const; 256 256 void ResetAllBondsToUnused() const; 257 int CountCyclicBonds( ofstream *out);258 bool CheckForConnectedSubgraph( ofstream *out,KeySet *Fragment);257 int CountCyclicBonds(); 258 bool CheckForConnectedSubgraph(KeySet *Fragment); 259 259 string GetColor(enum Shading color) const; 260 260 bond * CopyBond(atom *left, atom *right, bond *CopyBond); … … 265 265 266 266 /// Fragment molecule by two different approaches: 267 int FragmentMolecule( ofstream *out,int Order, config *configuration);268 bool CheckOrderAtSite( ofstream *out,bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);269 bool StoreAdjacencyToFile( ofstream *out,char *path);270 bool CheckAdjacencyFileAgainstMolecule( ofstream *out,char *path, atom **ListOfAtoms);271 bool ParseOrderAtSiteFromFile( ofstream *out,char *path);272 bool StoreOrderAtSiteFile( ofstream *out,char *path);273 bool StoreForcesFile( ofstream *out,MoleculeListClass *BondFragments, char *path, int *SortIndex);274 bool CreateMappingLabelsToConfigSequence( ofstream *out,int *&SortIndex);275 void BreadthFirstSearchAdd( ofstream *out,molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);267 int FragmentMolecule(int Order, config *configuration); 268 bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL); 269 bool StoreAdjacencyToFile(char *path); 270 bool CheckAdjacencyFileAgainstMolecule(char *path, atom **ListOfAtoms); 271 bool ParseOrderAtSiteFromFile(char *path); 272 bool StoreOrderAtSiteFile(char *path); 273 bool StoreForcesFile(MoleculeListClass *BondFragments, char *path, int *SortIndex); 274 bool CreateMappingLabelsToConfigSequence(int *&SortIndex); 275 void BreadthFirstSearchAdd(molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem); 276 276 /// -# BOSSANOVA 277 void FragmentBOSSANOVA( ofstream *out,Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);278 int PowerSetGenerator( ofstream *out,int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);279 bool BuildInducedSubgraph( ofstream *out,const molecule *Father);280 molecule * StoreFragmentFromKeySet( ofstream *out,KeySet &Leaflet, bool IsAngstroem);281 void SPFragmentGenerator( ofstream *out,struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);282 int LookForRemovalCandidate( ofstream *&out,KeySet *&Leaf, int *&ShortestPathList);283 int GuesstimateFragmentCount( ofstream *out,int order);277 void FragmentBOSSANOVA(Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize); 278 int PowerSetGenerator(int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet); 279 bool BuildInducedSubgraph(const molecule *Father); 280 molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); 281 void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder); 282 int LookForRemovalCandidate(KeySet *&Leaf, int *&ShortestPathList); 283 int GuesstimateFragmentCount(int order); 284 284 285 285 // Recognize doubly appearing molecules in a list of them 286 int * IsEqualToWithinThreshold( ofstream *out,molecule *OtherMolecule, double threshold);287 int * GetFatherSonAtomicMap( ofstream *out,molecule *OtherMolecule);286 int * IsEqualToWithinThreshold(molecule *OtherMolecule, double threshold); 287 int * GetFatherSonAtomicMap(molecule *OtherMolecule); 288 288 289 289 // Output routines. 290 bool Output(ofstream * out);291 bool OutputTrajectories(ofstream * out);292 void OutputListOfBonds( ofstream *out) const;293 bool OutputXYZ(ofstream * out) const;294 bool OutputTrajectoriesXYZ(ofstream * out);295 bool Checkout(ofstream * out) const;296 bool OutputTemperatureFromTrajectories(ofstream * out, int startstep, int endstep, ofstream *output);290 bool Output(ofstream * const output); 291 bool OutputTrajectories(ofstream * const output); 292 void OutputListOfBonds() const; 293 bool OutputXYZ(ofstream * const output) const; 294 bool OutputTrajectoriesXYZ(ofstream * const output); 295 bool Checkout(ofstream * const output) const; 296 bool OutputTemperatureFromTrajectories(ofstream * const output, int startstep, int endstep); 297 297 298 298 private: … … 313 313 ~MoleculeListClass(); 314 314 315 bool AddHydrogenCorrection( ofstream *out,char *path);316 bool StoreForcesFile( ofstream *out,char *path, int *SortIndex);315 bool AddHydrogenCorrection(char *path); 316 bool StoreForcesFile(char *path, int *SortIndex); 317 317 void insert(molecule *mol); 318 318 molecule * ReturnIndex(int index); 319 bool OutputConfigForListOfFragments( ofstream *out,config *configuration, int *SortIndex);319 bool OutputConfigForListOfFragments(config *configuration, int *SortIndex); 320 320 int NumberOfActiveMolecules(); 321 321 void Enumerate(ofstream *out); 322 322 void Output(ofstream *out); 323 void DissectMoleculeIntoConnectedSubgraphs( ofstream * const out,molecule * const mol, config * const configuration);323 void DissectMoleculeIntoConnectedSubgraphs(molecule * const mol, config * const configuration); 324 324 325 325 // merging of molecules … … 351 351 352 352 bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous); 353 bool FillBondStructureFromReference( ofstream *out,const molecule * const reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);354 bool FillRootStackForSubgraphs( ofstream *out,KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);355 bool AssignKeySetsToFragment( ofstream *out,molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);356 bool FillListOfLocalAtoms( ofstream *out,atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);357 void TranslateIndicesToGlobalIDs( ofstream *out,Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);353 bool FillBondStructureFromReference(const molecule * const reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false); 354 bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter); 355 bool AssignKeySetsToFragment(molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false); 356 bool FillListOfLocalAtoms(atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList); 357 void TranslateIndicesToGlobalIDs(Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph); 358 358 int Count() const; 359 359 };
Note:
See TracChangeset
for help on using the changeset viewer.