Commit d653044e authored by cmaffeo2's avatar cmaffeo2
Browse files

Increased bead model bond max length; fixed small bugs; improved handling of simulation output

parent 0eeb09e7
......@@ -1062,9 +1062,9 @@ component "data" value 3
for k,d in self._bondParams:
filename = self._arbdBondFilename(prefix,k,d)
if d > 10:
self._writeHarmonicPotentialFile( filename, k, d, xmax=800, maxForce=5 )
self._writeHarmonicPotentialFile( filename, k, d, xmax=2000, maxForce=5 )
else:
self._writeHarmonicPotentialFile( filename, k, d, xmax=800, maxForce=5 )
self._writeHarmonicPotentialFile( filename, k, d, xmax=2000, maxForce=5 )
self._bondParamFiles.add( filename )
def _writeAngleParameterFiles(self, prefix):
......
......@@ -760,7 +760,7 @@ class beadModelTwist():
try:
trans[b.idx] = minimizeRmsd( posOld, posNew )
except:
raise Error("Failed to find orientation of atom %d in the coarser model" % b.idx)
raise Exception("Failed to find orientation of atom %d in the coarser model" % b.idx)
# print("ugly")
## Optionally smooth orientations
......
......@@ -186,7 +186,7 @@ def simulateDesign(inFile, outPrefix, numCoarsestSteps=5000000, gpu=0, shiftEule
# finestModel.setUnassignedNtSeqs("T")
finestModel.writePdbPsf( out + ".ideal" )
finestModel.backmap( finerModel, finerModelCoords )
finestModel.simulate( out, gpus=gpu, namd=namd )
finestModel.simulate( out, numSteps=480000, gpus=gpu, numprocs=4, namd=namd )
if len(sys.argv) > 1:
files = sys.argv[1:]
......@@ -194,12 +194,23 @@ else:
files = sorted(glob.glob('json/*.json'))
def run(f):
print(f)
print("Working on %s with gpu %d" % (f,gpu))
out = re.match('json/(.*).json',f).group(1)
try:
simulateDesign(f, out, numCoarsestSteps=10000000, gpu=gpu)
except:
print("WARNING: %s: failed to simulate design")
oldOut = sys.stdout
oldErr = sys.stderr
with open("%s.log" % out, "w") as fh:
sys.stdout = fh
sys.stderr = fh
try:
simulateDesign(f, out, numCoarsestSteps=10000000, gpu=gpu)
except Exception as err:
print("WARNING: %s: failed to simulate design" % f)
print("ERROR:", err)
sys.stdout.flush()
sys.stdout = oldOut
sys.stderr = oldErr
gpus = [0,1,2]
# gpus = [2]
......
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