Commit fe860000 authored by cmaffeo2's avatar cmaffeo2
Browse files

Updated dnarbd script to better handle number-of-step arguments such as '1e7'

parent 2acb5e5d
......@@ -15,9 +15,9 @@ parser.add_argument('-d','--directory', type=str, default=None,
help='Directory for simulation; does not need to exist yet')
parser.add_argument('-g','--gpu', type=int, default=0,
help='GPU for simulation; check nvidia-smi for availability')
parser.add_argument('--coarse-steps', type=int, default=1e7,
parser.add_argument('--coarse-steps', type=float, default=1e7,
help='Simulation steps for coarse model (200 fs/step)')
parser.add_argument('--fine-steps', type=int, default=1e7,
parser.add_argument('--fine-steps', type=float, default=1e7,
help='Simulation steps for fine model (50 fs/step)')
parser.add_argument('--backbone-scale', type=float, default=1.0,
help='Factor to scale DNA backbone in atomic model; try 0.25 to avoid clashes for atomistic simulations')
......@@ -59,8 +59,8 @@ if __name__ == '__main__':
job_id = "job-" + prefix,
directory = args.directory,
gpu = args.gpu,
coarse_steps = args.coarse_steps,
fine_steps = args.fine_steps,
coarse_steps = int(args.coarse_steps),
fine_steps = int(args.fine_steps),
backbone_scale = args.backbone_scale
)
......
......@@ -18,8 +18,8 @@ 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+1
fine_steps = ((fine_steps//fine_output_period)+1)*fine_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
ret = None
d_orig = os.getcwd()
......
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