Commit e93e6468 authored by cmaffeo2's avatar cmaffeo2
Browse files

Enable group site restraints

parent 455420b8
......@@ -74,7 +74,8 @@ class Parent():
self.exclusions = []
self.bond_angles = []
self.product_potentials = []
self.group_sites = []
self.rigid = False
## TODO: self.cacheInvalid = True # What will be in the cache?
......@@ -172,7 +173,7 @@ class Parent():
def get_restraints(self):
ret = []
for c in self.children:
for c in self.children + self.group_sites:
ret.extend( c.get_restraints() )
return ret
......@@ -761,7 +762,8 @@ class ArbdModel(PdbModel):
raise NotImplementedError
self.particles = particles
self.idx = None
self.restraints = []
def get_center(self):
c = np.array((0,0,0))
for p in self.particles:
......@@ -769,6 +771,12 @@ class ArbdModel(PdbModel):
c = c / len(self.particles)
return c
def add_restraint(self, restraint):
self.restraints.append( restraint )
def get_restraints(self):
return [(self,r) for r in self.restraints]
def __init__(self, children, origin=None, dimensions=(1000,1000,1000), temperature=291, timestep=50e-6,
particle_integrator = 'Brown',
cutoff=50, decomp_period=1000, pairlist_distance=None, nonbonded_resolution=0.1,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment