Skip to content

Commit

Permalink
Merge pull request #161 from jsjyhzy/master
Browse files Browse the repository at this point in the history
[fix] add `conmethod` for `InternalCoordinates`
  • Loading branch information
leeping committed Sep 8, 2023
2 parents 0d12314 + a34ea6f commit cc963a7
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion geometric/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,33 @@ def finish(microiter, rmsdt, ndqt, xyzsave, xyz_iter1):
# Figure out the further change needed
dQ1 = dQ1 - dQ_actual
xyz1 = xyz2.copy()


@property
def conmethod(self):
''' algorithm for constraint satisfaction
Notes:
- `0`: Original algorithm implemented in 2016
- `1`: Updated algorithm implemented on 2019-03-20
Returns:
None | int: integer if the algorithm is applicable and indicate the revision of method,
or else `None` is returned
'''
if hasattr(self, '_conmethod'):
return self._conmethod
return None

@conmethod.setter
def conmethod(self, val):
''' set the algorithm for constraint satisfaction
Args:
val (None | int): algorithm revision
'''
self._conmethod = val


class PrimitiveInternalCoordinates(InternalCoordinates):
def __init__(self, molecule, connect=False, addcart=False, constraints=None, cvals=None, **kwargs):
super(PrimitiveInternalCoordinates, self).__init__()
Expand Down

0 comments on commit cc963a7

Please sign in to comment.