Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:56

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 
0026 //---------------------------------------------------------------
0027 //
0028 // G4AtomicBond
0029 //
0030 // Class Description:
0031 
0032 #ifndef G4AtomicBond_H
0033 #define G4AtomicBond_H 1
0034 
0035 #include "G4Element.hh"
0036 #include "globals.hh"
0037 
0038 class G4AtomicBond
0039 {
0040  public:
0041   enum theBondType
0042   {
0043     Ionic = 0,
0044     Covalent = 1,
0045     Metallic = 2,
0046     NA = -1
0047   };
0048 
0049   G4AtomicBond(theBondType aType, G4Element* firstAtomKind, G4int firstAtomNumber,
0050     G4Element* secondAtomKind, G4int secondAtomNumber)
0051     : theFirstAtomKind(firstAtomKind),
0052       theFirstAtomNumber(firstAtomNumber),
0053       theSecondAtomKind(secondAtomKind),
0054       theSecondAtomNumber(secondAtomNumber),
0055       theType(aType)
0056   {}
0057 
0058   virtual ~G4AtomicBond() = default;
0059 
0060   inline G4Element* GetFirstAtomKind() const { return theFirstAtomKind; };
0061   void SetFirstAtomKind(G4Element* aElement) { theFirstAtomKind = aElement; };
0062 
0063   inline G4int GetFirstAtomNumber() const { return theFirstAtomNumber; };
0064   void SetFirstAtomNumber(G4int aInt) { theFirstAtomNumber = aInt; };
0065 
0066   inline G4Element* GetSecondAtomKind() const { return theSecondAtomKind; };
0067   void SetSecondAtomKind(G4Element* aElement) { theSecondAtomKind = aElement; };
0068 
0069   inline G4int GetSecondAtomNumber() const { return theSecondAtomNumber; };
0070   void SetSecondAtomNumber(G4int aInt) { theSecondAtomNumber = aInt; };
0071 
0072   inline theBondType GetType() const { return theType; };
0073   void SetType(theBondType aType) { theType = aType; };
0074 
0075   inline G4bool GetAromaticity() const { return theAromaticity; };
0076   void SetAromaticity(G4bool aBool) { theAromaticity = aBool; };
0077 
0078  private:
0079   // The indexes of the two atoms connected by the bond are stored
0080   // theFirstAtomKind is the index in the vector of G4Elements in the array
0081   // and theFirstAtomNumber is the index in the vector of G4ThreeVector in
0082   // the G4CrystalLattice. For the second atom theSecondAtomKind and
0083   // theSecondAtomNumber are used.
0084   G4Element* theFirstAtomKind;
0085   G4int theFirstAtomNumber;
0086 
0087   G4Element* theSecondAtomKind;
0088   G4int theSecondAtomNumber;
0089 
0090   // theType stores which kind of bond is the G4AtomicBond object
0091   // there are three types: Ionic, Covalent and Metallic
0092   // and they are enumerate in the theBondType enum.
0093   theBondType theType;
0094 
0095   // theAromaticity stores if the bond is aromatic.
0096   G4bool theAromaticity{false};
0097 };
0098 
0099 #endif