Commit f506105a authored by cmaffeo2's avatar cmaffeo2
Browse files

Added ability to add custom extra lines to BD file using extra_bd_file_lines attribute in arbdmodel

parent 5bd0d211
......@@ -628,7 +628,7 @@ class PdbModel(Transformable, Parent):
class ArbdModel(PdbModel):
def __init__(self, children, dimensions=(1000,1000,1000), temperature=291, timestep=50e-6, cutoff=50, decompPeriod=10000, pairlistDistance=None, nonbondedResolution=0.1, remove_duplicate_bonded_terms=True):
def __init__(self, children, dimensions=(1000,1000,1000), temperature=291, timestep=50e-6, cutoff=50, decompPeriod=10000, pairlistDistance=None, nonbondedResolution=0.1, remove_duplicate_bonded_terms=True, extra_bd_file_lines=""):
PdbModel.__init__(self, children, dimensions, remove_duplicate_bonded_terms)
self.temperature = temperature
......@@ -641,6 +641,8 @@ class ArbdModel(PdbModel):
self.decompPeriod = decompPeriod
self.pairlistDistance = pairlistDistance
self.extra_bd_file_lines = extra_bd_file_lines
self.numParticles = 0
self.particles = []
self.type_counts = None
......@@ -857,6 +859,8 @@ pairlistDistance {pairlistDistance}
origin {originX} {originY} {originZ}
systemSize {dimX} {dimY} {dimZ}
{extra_bd_file_lines}
\n""".format(**params))
## Write entries for each type of particle
......
......@@ -436,7 +436,7 @@ class Segment(ConnectableElement, Group):
self.sequence = None
def __repr__(self):
return "<{} {}[{:d}]>".format( type(self), self.name, self.num_nt )
return "<{} {}[{:d}]>".format( str(type(self)).split('.')[-1], self.name, self.num_nt )
def set_splines(self, contours, coords):
tck, u = interpolate.splprep( coords.T, u=contours, s=0, k=1)
......@@ -1540,15 +1540,18 @@ class SegmentModel(ArbdModel):
dimensions=(5000,5000,5000), temperature=291,
timestep=50e-6, cutoff=50,
decompPeriod=10000, pairlistDistance=None,
nonbondedResolution=0,DEBUG=0,
debye_length = None
nonbondedResolution=0, DEBUG=0,
debye_length = None,
extra_bd_file_lines = "",
):
self.DEBUG = DEBUG
if DEBUG > 0: print("Building ARBD Model")
ArbdModel.__init__(self,segments,
dimensions, temperature, timestep, cutoff,
decompPeriod, pairlistDistance=None,
nonbondedResolution=0)
nonbondedResolution = 0,
extra_bd_file_lines = extra_bd_file_lines
)
# self.max_basepairs_per_bead = max_basepairs_per_bead # dsDNA
......
Markdown is supported
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