votca / xtp

GW-BSE for excited state Quantum Chemistry in a Gaussian Orbital basis, electronic spectroscopy with QM/MM, charge and energy dynamics in complex molecular systems
29 stars 16 forks source link

Refactor Atom Class #149

Closed JoshuaSBrown closed 5 years ago

JoshuaSBrown commented 6 years ago

I need feedback before I do this. I will be doing this by inheriting from the basebead

However, I have a few questions:

  1. What is the Weight method referring to is this the same as the Mass?
  2. I need a reminder of what these maps contain, I know we have discussed before: // charge state of segment => partial charge
    std::map<int, double> _Q;
    std::map<int, double>::iterator _q;
    votca::tools::matrix _ptensor;
  3. What is the ptensor, is this describing the orientation of the momentum?
  4. How is the QM Id setup, is there a second atom object associated with the quantum chemistry optimized structure?

Q is the partial charge where you define singlet, triplet and excited states?

JoshuaSBrown commented 6 years ago

Is state the same thing as multiplicity?

baumeier commented 6 years ago

No guarantees, so please anyone else call me out if I'm wrong:

What is the Weight method referring to is this the same as the Mass?

Yeah, usually. Although I believe it doesn't have to be. I think the weight will be used to calculate the CoM of a fragment/segment for the mapping. There might be cases in which one might want to exclude certain atoms from the CoM, e.g., hydrogens.

// charge state of segment => partial charge std::map<int, double> _Q;

As it says, it's the partial charge of the atom, as obtained from ESP fits. But there can be different charges depending on what state the molecule is in. I think the states are electron (int: -1), neutral (int: 0), hole (int: 1), singlet exciton (int: 2), triplet exciton (int: 3).

What is the ptensor, is this describing the orientation of the momentum?

Probably the atomic polarizibility tensor, as read from the *.mps file.

Is state the same thing as multiplicity?

State is the integer label of the electron, neutral, hole, singlet exciton, triplet exciton states as above.

JoshuaSBrown commented 6 years ago

@JensWehner and @gtirimbo if you guys have any input on this I would appreciate it.

JoshuaSBrown commented 6 years ago

So, I see that the qmatom makes a distinction between the nuclear charge and the partial charge, this is separate from the setQ and getQ methods in the normal atom class.


   int getNuccharge() { return nuccharge-ecpcharge;}

   void setPartialcharge(double _q){partialcharge=_q;}
   const double & getPartialcharge() const { return partialcharge;}

any ideas what ecpcharge is? electro-chemical-potential charge?

JoshuaSBrown commented 6 years ago

I have to admit the apolarsite class looks very daunting... I'm wondering how much of the functionality could be broken out of the class to reduce it's functionality. There are a few common methods and some that are structurally based that would make since. Potential functions to break out of apolarsite:

  // GET & SET & IMPORT FUNCTIONS                                              
    int            &getId() { return _id; }                                      
    std::string         &getName() { return _name; }                             
    votca::tools::vec            &getPos() { return _pos; }                      
    // Point charge 0,1 dipole,2 quad                                            
    int            &getRank() { return _rank; }                                  
    Topology       *getTopology() { return _top; }                               
    Segment        *getSegment() { return _seg; }                                
    Fragment       *getFragment() { return _frag; }                              
        void            setPos(votca::tools::vec &pos) { _pos = pos; }               
    void            setTopology(Topology *top) { _top = top; }                   
    void            setSegment(Segment *seg) { _seg = seg; }                     
    void            setFragment(Fragment *frag) { _frag = frag; }       
    // COORDINATE TRANSFORMATION                                                 
    void            Translate(const votca::tools::vec &shift);                   
    void            Rotate(const votca::tools::matrix &rot, const votca::tools::vec &refPos);
    // CHARGE -1 0 +1 & DELTA                                                    
    void            Charge(int state);                                           
    void            ChargeDelta(int state1, int state2);             
   // PRINT FUNCTS & OUTPUT TO FORMAT                                           
    void            PrintInfo(std::ostream &out);                                
    void            PrintTensorPDB(FILE *out, int state);                        
    void            WriteChkLine(FILE *, votca::tools::vec &, bool, std::string, double);
    void            WriteXyzLine(FILE *, votca::tools::vec &, std::string);      
    void            WritePdbLine(FILE *out, const std::string &tag = "");        
    void            WriteMpsLine(std::ostream &out, std::string unit);           
    void            WriteXmlLine(std::ostream &out);         
JensWehner commented 6 years ago

I have not seen this, do not use polarsite, we have a cleanup version already in embedding branch called polarsite

JensWehner commented 6 years ago

I personally think, the atom object should have non of this information, ecp charge is purely interesting for QMAtoms

baumeier commented 5 years ago

What is the status of this issue?

JoshuaSBrown commented 5 years ago

I have not done anything with this since August, though the last time @JensWehner and I talked it was mentioned. From what I remember of our discussion there were three classes that had similar functionality but were used for distinctly different purposes: atom class - similar functionality to csg bead class apolarsite class - takes care of the electro statics qmatom class - quantum mechanical version of the atom I cannot remember if we came to an strong consensus on how to separate the functionality to clean them up but I know that Jens has made small changes since then.

JensWehner commented 5 years ago

the issue will be dealt with in the elektrostatics branch

JoshuaSBrown commented 5 years ago

This was done in the electrostatics branch closing.