Commit cf915a07 authored by cmaffeo2's avatar cmaffeo2
Browse files

Likely fixed most backmapping bugs

parent b670c7f0
......@@ -710,7 +710,7 @@ class ArbdModel(PdbModel):
def _writeArbdParticleFile(self, filename):
with open(filename,'w') as fh:
for p in self.particles:
data = tuple([p.idx,p.name] + [x for x in p.collapsedPosition()])
data = tuple([p.idx,p.type_.name] + [x for x in p.collapsedPosition()])
fh.write("ATOM %d %s %f %f %f\n" % data)
......
......@@ -199,7 +199,8 @@ class cadnano_part(SegmentModel):
self.part = part
self._cadnano_part_to_segments(part)
# SegmentModel.__init__(self,...)
self.segments = [seg for hid,segs in self.helices.items() for seg in segs]
# self.segments = [seg for hid,segs in self.helices.items() for seg in segs]
self.segments = [seg for hid,segs in sorted(self.helices.items()) for seg in segs]
self._add_intrahelical_connections()
self._add_crossovers()
self._add_prime_ends()
......@@ -227,7 +228,10 @@ class cadnano_part(SegmentModel):
vh_list = []
strand_list = []
self.xover_list = xover_list = []
numHID = part.getIdNumMax() + 1
try:
numHID = part.getMaxIdNum() + 1
except:
numHID = part.getIdNumMax() + 1
for id_num in range(numHID):
offset_and_size = part.getOffsetAndSize(id_num)
......@@ -527,14 +531,13 @@ def run_simulation_protocol( output_name, job_id, json_data,
remove_long_bonds=False,
gpu = 0,
directory=None,
coarse_steps = 1e6,
fine_steps = 1e6
coarse_steps = 1e5+1,
fine_steps = 1e5+1
):
ret = None
d_orig = os.getcwd()
try:
directory = "/dev/shm/origami-job-robot_v1.9_bent--0f4axf4k"
if directory is None:
import tempfile
directory = tempfile.mkdtemp(prefix='origami-%s-' % job_id, dir='/dev/shm/')
......@@ -594,7 +597,7 @@ def run_simulation_protocol( output_name, job_id, json_data,
else:
output_prefix = "%s-1" % output_name
full_output_prefix = "%s/%s" % (output_directory,output_prefix)
# model.simulate( outputPrefix = output_prefix, numSteps=coarse_steps, **simargs )
model.simulate( outputPrefix = output_prefix, numSteps=coarse_steps, **simargs )
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
......@@ -605,7 +608,7 @@ def run_simulation_protocol( output_name, job_id, json_data,
model._update_segment_positions(coordinates)
model._clear_beads()
model._generate_bead_model( 1, 1, local_twist=True, escapable_twist=True )
# model.simulate( outputPrefix = output_prefix, numSteps=fine_steps, **simargs )
model.simulate( outputPrefix = output_prefix, numSteps=fine_steps, **simargs )
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.0.dcd' % full_output_prefix, rmsdThreshold=1)
......
......@@ -19,7 +19,7 @@ if __name__ == '__main__':
print("WARNING: skipping unreadable json file {}".format(f))
continue
run_simulation_protocol( out, "job-"+out+"-", data, gpu=0 )
run_simulation_protocol( out, "job-"+out+"-", data, gpu=1 )
# try:
# run_simulation_protocol( out, "job-"+out+"-", data, gpu=0 )
# except:
......
This diff is collapsed.
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