ZimmermanGroup/pyGSM

Frozen_atom is buggy in current version

Opened this issue · 0 comments

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