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