Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecules.hpp

    r437922 r2746be  
    6969#define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> >
    7070
    71 #define MoleculeList list <molecule *>
    72 #define MoleculeListTest pair <MoleculeList::iterator, bool>
    73 
    7471/******************************** Some small functions and/or structures **********************************/
    7572
     
    117114  element *type;
    118115};
     116
     117
    119118
    120119/** Single atom.
     
    130129    atom *father;   //!< In many-body bond order fragmentations points to originating atom
    131130    atom *Ancestor; //!< "Father" in Depth-First-Search
    132     char *Name;      //!< unique name used during many-body bond-order fragmentation
     131    char *Name;                 //!< unique name used during many-body bond-order fragmentation
    133132    int FixedIon;   //!< config variable that states whether forces act on the ion or not
    134133    int *sort;      //!< sort criteria
     
    145144  ~atom();
    146145
    147   bool Output(int ElementNo, int AtomNo, ofstream *out, const char *comment = NULL) const;
     146  bool Output(int ElementNo, int AtomNo, ofstream *out) const;
    148147  bool OutputXYZLine(ofstream *out) const;
    149148  atom *GetTrueFather();
     
    162161class bond {
    163162  public:
    164     atom *leftatom;    //!< first bond partner
    165     atom *rightatom;  //!< second bond partner
     163        atom *leftatom;         //!< first bond partner
     164        atom *rightatom;        //!< second bond partner
    166165    bond *previous; //!< previous atom in molecule list
    167166    bond *next;     //!< next atom in molecule list
    168     int HydrogenBond;  //!< Number of hydrogen atoms in the bond
    169     int BondDegree;    //!< single, double, triple, ... bond
     167        int HydrogenBond;       //!< Number of hydrogen atoms in the bond
     168        int BondDegree;         //!< single, double, triple, ... bond
    170169    int nr;           //!< unique number in a molecule, updated by molecule::CreateAdjacencyList()
    171170    bool Cyclic;      //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis()
     
    211210    int MDSteps;        //!< The number of MD steps in Trajectories
    212211    int *NumberOfBondsPerAtom;  //!< Number of Bonds each atom has
    213     int AtomCount;          //!< number of atoms, brought up-to-date by CountAtoms()
    214     int BondCount;          //!< number of atoms, brought up-to-date by CountBonds()
     212    int AtomCount;                                      //!< number of atoms, brought up-to-date by CountAtoms()
     213    int BondCount;                                      //!< number of atoms, brought up-to-date by CountBonds()
    215214    int ElementCount;       //!< how many unique elements are therein
    216215    int ElementsInMolecule[MAX_ELEMENTS]; //!< list whether element (sorted by atomic number) is alread present or not
    217     int NoNonHydrogen;  //!< number of non-hydrogen atoms in molecule
     216    int NoNonHydrogen;  //!< number of non-hydrogen atoms in molecule
    218217    int NoNonBonds;     //!< number of non-hydrogen bonds in molecule
    219218    int NoCyclicBonds;  //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis()
    220219    double BondDistance;  //!< typical bond distance used in CreateAdjacencyList() and furtheron
    221     bool ActiveFlag;    //!< in a MoleculeListClass used to discern active from inactive molecules
    222     Vector Center;      //!< Center of molecule in a global box
    223     char name[MAXSTRINGSIZE];         //!< arbitrary name
    224     int IndexNr;        //!< index of molecule in a MoleculeListClass
    225220
    226221  molecule(periodentafel *teil);
     
    230225  bool AddAtom(atom *pointer);
    231226  bool RemoveAtom(atom *pointer);
    232   bool UnlinkAtom(atom *pointer);
    233227  bool CleanupMolecule();
    234228
     
    251245  bool CenterInBox(ofstream *out, Vector *BoxLengths);
    252246  void CenterEdge(ofstream *out, Vector *max);
    253   void CenterOrigin(ofstream *out);
    254   void CenterPeriodic(ofstream *out);
    255   void CenterAtVector(ofstream *out, Vector *newcenter);
     247  void CenterOrigin(ofstream *out, Vector *max);
     248  void CenterGravity(ofstream *out, Vector *max);
    256249  void Translate(const Vector *x);
    257250  void Mirror(const Vector *x);
    258251  void Align(Vector *n);
    259252  void Scale(double **factor);
    260   void DeterminePeriodicCenter(Vector &center);
     253  void DetermineCenter(Vector &center);
    261254  Vector * DetermineCenterOfGravity(ofstream *out);
    262255  Vector * DetermineCenterOfAll(ofstream *out);
    263   void SetNameFromFilename(const char *filename);
    264256  void SetBoxDimension(Vector *dim);
    265257  double * ReturnFullMatrixforSymmetric(double *cell_size);
    266258  void ScanForPeriodicCorrection(ofstream *out);
    267   void PrincipalAxisSystem(ofstream *out, bool DoRotate);
    268   double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
    269   Vector* FindEmbeddingHole(ofstream *out, molecule *srcmol);
    270 
    271   bool VerletForceIntegration(char *file, double delta_t, bool IsAngstroem);
     259        void PrincipalAxisSystem(ofstream *out, bool DoRotate);
     260        double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
     261        bool VerletForceIntegration(char *file, double delta_t, bool IsAngstroem);
    272262
    273263  bool CheckBounds(const Vector *x) const;
     
    310300  /// -# BOSSANOVA
    311301  void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
    312   int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
     302        int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
    313303  bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
    314304  molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
     
    338328class MoleculeListClass {
    339329  public:
    340     MoleculeList ListOfMolecules; //!< List of the contained molecules
    341     int MaxIndex;
     330    molecule **ListOfMolecules;   //!< pointer list of fragment molecules to check for equality
     331    int NumberOfMolecules;        //!< Number of entries in \a **FragmentList and of to be returned one.
     332    int NumberOfTopAtoms;         //!< Number of atoms in the molecule from which all fragments originate
    342333
    343334  MoleculeListClass();
     335  MoleculeListClass(int Num, int NumAtoms);
    344336  ~MoleculeListClass();
    345337
     338  /// Output configs.
    346339  bool AddHydrogenCorrection(ofstream *out, char *path);
    347340  bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
    348   void insert(molecule *mol);
    349   molecule * ReturnIndex(int index);
    350341  bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex);
    351   int NumberOfActiveMolecules();
    352   void Enumerate(ofstream *out);
    353342  void Output(ofstream *out);
    354 
    355   // merging of molecules
    356   bool SimpleMerge(molecule *mol, molecule *srcmol);
    357   bool SimpleAdd(molecule *mol, molecule *srcmol);
    358   bool SimpleMultiMerge(molecule *mol, int *src, int N);
    359   bool SimpleMultiAdd(molecule *mol, int *src, int N);
    360   bool ScatterMerge(molecule *mol, int *src, int N);
    361   bool EmbedMerge(molecule *mol, molecule *srcmol);
    362343
    363344  private:
     
    475456  bool Save(const char *filename, periodentafel *periode, molecule *mol) const;
    476457  bool SaveMPQC(const char *filename, molecule *mol) const;
    477   void Edit();
     458  void Edit(molecule *mol);
    478459  bool GetIsAngstroem() const;
    479460  char *GetDefaultPath() const;
Note: See TracChangeset for help on using the changeset viewer.