Commit dbcd2764 authored by cmaffeo2's avatar cmaffeo2
Browse files

Removed cache in resources

parent 740f7904
......@@ -9,9 +9,6 @@ from mrdna.config import CACHE_DIR
## TODO: clean this file up a bit, make things protected
_package_cache_dir = get_resource_path("nbPot_cache")
_package_cache_dir.mkdir(exist_ok=True)
_dxParam = -1
def _maxForce(x,u0,maxForce=40):
......
......@@ -21,7 +21,9 @@ def multiresolution_simulation( model, output_name,
## Round steps up to nearest multiple of output_period, plus 1
coarse_steps = ((coarse_steps+coarse_output_period-1)//coarse_output_period)*coarse_output_period+1
fine_steps = ((fine_steps+fine_output_period-1)//fine_output_period)*fine_output_period+1
fine_steps = ((fine_steps+fine_output_period-1)//fine_output_period)
if fine_steps == 1: fine_steps += 1
fine_steps = fine_steps*fine_output_period+1
ret = None
d_orig = os.getcwd()
......@@ -74,6 +76,12 @@ def multiresolution_simulation( model, output_name,
model._clear_beads()
model._generate_bead_model( 1, 1, local_twist=True, escapable_twist=True )
model.simulate( output_name = output_prefix, num_steps=fine_steps, **simargs )
if fine_steps <= 2*fine_output_period+1:
try:
coordinates = readArbdCoords('%s.restart' % full_output_prefix)
except:
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
else:
try:
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.dcd' % full_output_prefix, rmsdThreshold=1)
except:
......@@ -87,10 +95,16 @@ def multiresolution_simulation( model, output_name,
model._clear_beads()
model._generate_bead_model( 1, 1, local_twist=True, escapable_twist=False )
model.simulate( output_name = output_prefix, num_steps=fine_steps, **simargs )
if fine_steps <= 2*fine_output_period+1:
try:
coordinates = readArbdCoords('%s.restart' % full_output_prefix)
except:
coordinates = readArbdCoords('%s.0.restart' % full_output_prefix)
else:
try:
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.dcd' % full_output_prefix )
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 )
coordinates = readAvgArbdCoords('%s.psf' % output_prefix,'%s.pdb' % output_prefix, '%s.0.dcd' % full_output_prefix, rmsdThreshold=1)
""" 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