#!/usr/bin/env python

__author__ = "Randall J. Radmer"
__version__ = "1.0"
__doc__ = """Example script to test Nast."""


pdbInFilename		= "input.pdb" # Do not change for NASTIER runs
pdbOutFilename		= "output.pdb" # DO not change for NASTIER runs
helixFilename		= "input-helix.txt"
contactsFilename	= ""
numSteps		= 100000000 # NASTIER will stop runs when this is exceeded.
stepsPerReport		= 10000 # Optimize carefully for NASTIER runs.
defaultTemperature	= 300  
randomSeed	    	= None # Do not change for NASTIER runs
explosionDetection  	= 10 # Numer of previous steps that explosion detection
                             # is based on. Set to False for no detection.
verbose			= False

import simtk.nast.molecule as molecule
(explosion_detected, lastPdb) = molecule.run(pdbInFilename=pdbInFilename,
             pdbOutFilename=pdbOutFilename,
             helixFilename=helixFilename,
             contactsFilename=contactsFilename,
             numSteps=numSteps,
             stepsPerReport=stepsPerReport,
             defaultTemperature=defaultTemperature,
             randomSeed=randomSeed,
             explosionDetection=explosionDetection,
             verbose=verbose)
print explosion_detected

# Leave the following commented out for NASTIER runs.
#lastPdbOut = open('%s-last.pdb' % pdbOutFilename[:-4], 'w')
#lastPdbOut.writelines(lastPdb)
