Ignore:
Timestamp:
Jul 23, 2009, 1:45:24 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
47548d
Parents:
560995 (diff), 1b2aa1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Frederik Heber <heber@…> (07/23/09 12:34:47)
git-committer:
Frederik Heber <heber@…> (07/23/09 13:45:24)
Message:

Merge branch 'MultipleMolecules'

Conflicts:

molecuilder/src/analyzer.cpp
molecuilder/src/atom.cpp
molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/datacreator.hpp
molecuilder/src/helpers.cpp
molecuilder/src/joiner.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/molecules.cpp
molecuilder/src/molecules.hpp
molecuilder/src/parser.cpp
molecuilder/src/parser.hpp
molecuilder/src/vector.cpp
molecuilder/src/verbose.cpp

merges:

compilation fixes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecules.hpp

    r560995 rf39735  
    7171#define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> >
    7272
     73#define MoleculeList list <molecule *>
     74#define MoleculeListTest pair <MoleculeList::iterator, bool>
     75
    7376/******************************** Some small functions and/or structures **********************************/
    7477
     
    116119  element *type;
    117120};
    118 
    119 
    120121
    121122/** Single atom.
     
    131132    atom *father;   //!< In many-body bond order fragmentations points to originating atom
    132133    atom *Ancestor; //!< "Father" in Depth-First-Search
    133     char *Name;                 //!< unique name used during many-body bond-order fragmentation
     134    char *Name;      //!< unique name used during many-body bond-order fragmentation
    134135    int FixedIon;   //!< config variable that states whether forces act on the ion or not
    135136    int *sort;      //!< sort criteria
     
    146147  ~atom();
    147148
    148   bool Output(int ElementNo, int AtomNo, ofstream *out) const;
     149  bool Output(int ElementNo, int AtomNo, ofstream *out, const char *comment = NULL) const;
    149150  bool OutputXYZLine(ofstream *out) const;
    150151  atom *GetTrueFather();
     
    163164class bond {
    164165  public:
    165         atom *leftatom;         //!< first bond partner
    166         atom *rightatom;        //!< second bond partner
     166    atom *leftatom;    //!< first bond partner
     167    atom *rightatom;  //!< second bond partner
    167168    bond *previous; //!< previous atom in molecule list
    168169    bond *next;     //!< next atom in molecule list
    169         int HydrogenBond;       //!< Number of hydrogen atoms in the bond
    170         int BondDegree;         //!< single, double, triple, ... bond
     170    int HydrogenBond;  //!< Number of hydrogen atoms in the bond
     171    int BondDegree;    //!< single, double, triple, ... bond
    171172    int nr;           //!< unique number in a molecule, updated by molecule::CreateAdjacencyList()
    172173    bool Cyclic;      //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis()
     
    218219    int MDSteps;        //!< The number of MD steps in Trajectories
    219220    int *NumberOfBondsPerAtom;  //!< Number of Bonds each atom has
    220     int AtomCount;                                      //!< number of atoms, brought up-to-date by CountAtoms()
    221     int BondCount;                                      //!< number of atoms, brought up-to-date by CountBonds()
     221    int AtomCount;          //!< number of atoms, brought up-to-date by CountAtoms()
     222    int BondCount;          //!< number of atoms, brought up-to-date by CountBonds()
    222223    int ElementCount;       //!< how many unique elements are therein
    223224    int ElementsInMolecule[MAX_ELEMENTS]; //!< list whether element (sorted by atomic number) is alread present or not
    224     int NoNonHydrogen;  //!< number of non-hydrogen atoms in molecule
     225    int NoNonHydrogen;  //!< number of non-hydrogen atoms in molecule
    225226    int NoNonBonds;     //!< number of non-hydrogen bonds in molecule
    226227    int NoCyclicBonds;  //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis()
    227228    double BondDistance;  //!< typical bond distance used in CreateAdjacencyList() and furtheron
     229    bool ActiveFlag;    //!< in a MoleculeListClass used to discern active from inactive molecules
     230    Vector Center;      //!< Center of molecule in a global box
     231    char name[MAXSTRINGSIZE];         //!< arbitrary name
     232    int IndexNr;        //!< index of molecule in a MoleculeListClass
    228233
    229234  molecule(periodentafel *teil);
     
    233238  bool AddAtom(atom *pointer);
    234239  bool RemoveAtom(atom *pointer);
     240  bool UnlinkAtom(atom *pointer);
    235241  bool CleanupMolecule();
    236242
     
    253259  bool CenterInBox(ofstream *out, Vector *BoxLengths);
    254260  void CenterEdge(ofstream *out, Vector *max);
    255   void CenterOrigin(ofstream *out, Vector *max);
    256   void CenterGravity(ofstream *out, Vector *max);
     261  void CenterOrigin(ofstream *out);
     262  void CenterPeriodic(ofstream *out);
     263  void CenterAtVector(ofstream *out, Vector *newcenter);
    257264  void Translate(const Vector *x);
    258265  void Mirror(const Vector *x);
    259266  void Align(Vector *n);
    260267  void Scale(double **factor);
    261   void DetermineCenter(Vector &center);
     268  void DeterminePeriodicCenter(Vector &center);
    262269  Vector * DetermineCenterOfGravity(ofstream *out);
    263270  Vector * DetermineCenterOfAll(ofstream *out);
     271  void SetNameFromFilename(const char *filename);
    264272  void SetBoxDimension(Vector *dim);
    265273  double * ReturnFullMatrixforSymmetric(double *cell_size);
    266274  void ScanForPeriodicCorrection(ofstream *out);
    267         void PrincipalAxisSystem(ofstream *out, bool DoRotate);
    268         double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
    269        
    270275  bool VerletForceIntegration(ofstream *out, char *file, config &configuration);
    271276  void Thermostats(config &configuration, double ActualTemp, int Thermostat);
     277  void PrincipalAxisSystem(ofstream *out, bool DoRotate);
     278  double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
     279  Vector* FindEmbeddingHole(ofstream *out, molecule *srcmol);
     280
    272281
    273282  double ConstrainedPotential(ofstream *out, atom **permutation, int start, int end, double *constants, bool IsAngstroem);
     
    315324  /// -# BOSSANOVA
    316325  void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
    317         int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
     326  int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
    318327  bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
    319328  molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
     
    343352class MoleculeListClass {
    344353  public:
    345     molecule **ListOfMolecules;   //!< pointer list of fragment molecules to check for equality
    346     int NumberOfMolecules;        //!< Number of entries in \a **FragmentList and of to be returned one.
    347     int NumberOfTopAtoms;         //!< Number of atoms in the molecule from which all fragments originate
     354    MoleculeList ListOfMolecules; //!< List of the contained molecules
     355    int MaxIndex;
    348356
    349357  MoleculeListClass();
    350   MoleculeListClass(int Num, int NumAtoms);
    351358  ~MoleculeListClass();
    352359
    353   /// Output configs.
    354360  bool AddHydrogenCorrection(ofstream *out, char *path);
    355361  bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
    356   bool OutputConfigForListOfFragments(ofstream *out, const char *fragmentprefix, config *configuration, int *SortIndex, bool DoPeriodic, bool DoCentering);
     362  void insert(molecule *mol);
     363  molecule * ReturnIndex(int index);
     364  bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex);
     365  int NumberOfActiveMolecules();
     366  void Enumerate(ofstream *out);
    357367  void Output(ofstream *out);
     368
     369  // merging of molecules
     370  bool SimpleMerge(molecule *mol, molecule *srcmol);
     371  bool SimpleAdd(molecule *mol, molecule *srcmol);
     372  bool SimpleMultiMerge(molecule *mol, int *src, int N);
     373  bool SimpleMultiAdd(molecule *mol, int *src, int N);
     374  bool ScatterMerge(molecule *mol, int *src, int N);
     375  bool EmbedMerge(molecule *mol, molecule *srcmol);
    358376
    359377  private:
     
    479497  bool Save(const char *filename, periodentafel *periode, molecule *mol) const;
    480498  bool SaveMPQC(const char *filename, molecule *mol) const;
    481   void Edit(molecule *mol);
     499  void Edit();
    482500  bool GetIsAngstroem() const;
    483501  char *GetDefaultPath() const;
Note: See TracChangeset for help on using the changeset viewer.