ZimmermanGroup / pyGSM

Thermal and photochemical reaction path optimization and discovery
MIT License
50 stars 26 forks source link

Frozen_atom is buggy in current version #33

Open ms860309 opened 3 years ago

ms860309 commented 3 years ago

Hi, The older version of pyGSM treats the frozen atom and its gradient in pygsm/coordinate_systems/internal_coordinates.py. But now is in pygsm/level_of_theories/base_lot.py

def get_gradient(self,coords,multiplicity,state,frozen_atoms=None):
    if self.hasRanForCurrentCoords==False or (coords != self.currentCoords).any():
        self.currentCoords = coords.copy()
        geom = manage_xyz.np_to_xyz(self.geom,self.currentCoords)
        self.runall(geom)
    Gradient = self.Gradients[(multiplicity,state)]
    if Gradient.value is not None:
        if frozen_atoms is not None:
            for a in frozen_atoms:
                Gradient.value[a,:]=0.

This change seems to make node can not converge while using frozen atoms. image

Jianyi