Skip to content

Commit 37289c7

Browse files
committed
change atomtype to Xv if bond is can der waals when applying action
1 parent 85a84d3 commit 37289c7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

rmgpy/data/kinetics/family.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,22 @@ def _apply(self, struct, forward, unique):
333333
atom1.apply_action(['CHANGE_BOND', label1, info, label2])
334334
atom2.apply_action(['CHANGE_BOND', label1, info, label2])
335335
bond.apply_action(['CHANGE_BOND', label1, info, label2])
336+
if pattern:
337+
if bond.is_van_der_waals():
338+
if atom1.is_surface_site():
339+
atom1.atomtype = [ATOMTYPES['Xv']]
340+
else:
341+
atom2.atomtype = [ATOMTYPES['Xv']]
336342
else:
337343
atom1.apply_action(['CHANGE_BOND', label1, -info, label2])
338344
atom2.apply_action(['CHANGE_BOND', label1, -info, label2])
339345
bond.apply_action(['CHANGE_BOND', label1, -info, label2])
346+
if pattern:
347+
if bond.is_van_der_waals():
348+
if atom1.is_surface_site():
349+
atom1.atomtype = [ATOMTYPES['Xv']]
350+
else:
351+
atom2.atomtype = [ATOMTYPES['Xv']]
340352
elif (action[0] == 'FORM_BOND' and forward) or (action[0] == 'BREAK_BOND' and not forward):
341353
if struct.has_bond(atom1, atom2):
342354
raise InvalidActionError('Attempted to create an existing bond.')

0 commit comments

Comments
 (0)