Skip to content

Commit

Permalink
Added generator for cross terms with bend term linear in the cos(angle)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvduyfhu committed Feb 1, 2018
1 parent 56a552b commit d3dc1c3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions yaff/pes/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,33 @@ def get_indexes2(self, indexes):
return indexes


class CrossCosBendGenerator(ValenceCrossGenerator):
prefix = 'CROSSCBEND'
par_info = [('KSS', float), ('KBS0', float), ('KBS1', float), ('R0', float), ('R1', float), ('COS0', float)]
nffatype = 3
ICClass0 = Bond
ICClass1 = Bond
ICClass2 = BendCos
VClass01 = Cross
VClass02 = Cross
VClass12 = Cross

def iter_alt_keys(self, key):
yield key

def iter_indexes(self, system):
return system.iter_angles()

def get_indexes0(self, indexes):
return indexes[:2]

def get_indexes1(self, indexes):
return indexes[1:]

def get_indexes2(self, indexes):
return indexes


class NonbondedGenerator(Generator):
'''All generators for the non-bonding interactions derive from this class
Expand Down

0 comments on commit d3dc1c3

Please sign in to comment.