Commit bad59dec authored by cmaffeo2's avatar cmaffeo2
Browse files

Modified simulation protocol to try loading files without '.0' suffix

parent 845b516c
......@@ -46,7 +46,10 @@ def multiresolution_simulation( model, output_name,
full_output_prefix = "%s/%s" % (output_directory,output_prefix)
## TODO Remove long bonds
model.simulate( outputPrefix = output_prefix, numSteps=0.05*coarse_steps, **simargs )
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
try:
coordinates = readArbdCoords('%s.restart' % full_output_prefix)
except:
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
output_prefix = "%s-1" % output_name
model._update_segment_positions(coordinates)
model.simulate( outputPrefix = output_prefix, numSteps=0.95*coarse_steps, **simargs )
......@@ -54,7 +57,10 @@ def multiresolution_simulation( model, output_name,
output_prefix = "%s-1" % output_name
full_output_prefix = "%s/%s" % (output_directory,output_prefix)
model.simulate( outputPrefix = output_prefix, numSteps=coarse_steps, **simargs )
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
try:
coordinates = readArbdCoords('%s.restart' % full_output_prefix)
except:
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
""" Fine simulation """
......@@ -66,7 +72,10 @@ def multiresolution_simulation( model, output_name,
model._clear_beads()
model._generate_bead_model( 1, 1, local_twist=True, escapable_twist=True )
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)
try:
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.dcd' % full_output_prefix, rmsdThreshold=1)
except:
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.0.dcd' % full_output_prefix, rmsdThreshold=1)
""" Freeze twist """
......@@ -76,7 +85,10 @@ def multiresolution_simulation( model, output_name,
model._clear_beads()
model._generate_bead_model( 1, 1, local_twist=True, escapable_twist=False )
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 )
try:
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.dcd' % full_output_prefix )
except:
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.0.dcd' % full_output_prefix )
""" Atomic simulation """
......
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