Beispiel #1
0
def dispatch(args):
    if args['--targetsfile']:
        with open(args['--targetsfile'], 'r') as targetsfile:
            targets = [
                line.strip() for line in targetsfile.readlines()
                if line[0] != '#'
            ]
    elif args['--targets']:
        targets = args['--targets'].split(',')
    else:
        targets = False

    if args['--templatesfile']:
        with open(args['--templatesfile'], 'r') as templatesfile:
            templates = [
                line.strip() for line in templatesfile.readlines()
                if line[0] != '#'
            ]
    elif args['--templates']:
        templates = args['--templates'].split(',')
    else:
        templates = False

    if args['--model_seqid_cutoff']:
        model_seqid_cutoff = float(args['--model_seqid_cutoff'])
    else:
        model_seqid_cutoff = False

    if args['--gpupn']:
        gpupn = int(args['--gpupn'])
    else:
        gpupn = 1

    sim_length = eval_quantity_string(args['--simlength'])

    if args['--verbose']:
        loglevel = 'debug'
    else:
        loglevel = 'info'

    if args['--api_params']:
        api_params = parse_api_params_string(args['--api_params'])
    else:
        api_params = {}

    ensembler.refinement.refine_explicit_md(
        openmm_platform=args['--openmm_platform'],
        gpupn=gpupn,
        sim_length=sim_length,
        process_only_these_targets=targets,
        process_only_these_templates=templates,
        model_seqid_cutoff=model_seqid_cutoff,
        retry_failed_runs=args['--retry_failed_runs'],
        write_solvated_model=args['--write_solvated_model'],
        ff=args['--ff'],
        water_model=args['--water_model'],
        verbose=args['--verbose'],
        **api_params)
def dispatch(args):
    if args['--targetsfile']:
        with open(args['--targetsfile'], 'r') as targetsfile:
            targets = [line.strip() for line in targetsfile.readlines() if line[0] != '#']
    elif args['--targets']:
        targets = args['--targets'].split(',')
    else:
        targets = False

    if args['--templatesfile']:
        with open(args['--templatesfile'], 'r') as templatesfile:
            templates = [line.strip() for line in templatesfile.readlines() if line[0] != '#']
    elif args['--templates']:
        templates = args['--templates'].split(',')
    else:
        templates = False

    if args['--template_seqid_cutoff']:
        template_seqid_cutoff = float(args['--template_seqid_cutoff'])
    else:
        template_seqid_cutoff = False

    if args['--gpupn']:
        gpupn = int(args['--gpupn'])
    else:
        gpupn = 1

    sim_length = eval_quantity_string(args['--simlength'])

    if args['--verbose']:
        loglevel = 'debug'
    else:
        loglevel = 'info'

    if args['--api_params']:
        api_params = parse_api_params_string(args['--api_params'])
    else:
        api_params = {}

    ensembler.refinement.refine_explicit_md(
        openmm_platform=args['--openmm_platform'],
        gpupn=gpupn,
        sim_length=sim_length,
        process_only_these_targets=targets,
        process_only_these_templates=templates,
        template_seqid_cutoff=template_seqid_cutoff,
        retry_failed_runs=args['--retry_failed_runs'],
        write_solvated_model=args['--write_solvated_model'],
        ff=args['--ff'],
        water_model=args['--water_model'],
        verbose=args['--verbose'],
        **api_params
    )
Beispiel #3
0
def test_eval_quantity_string():
    quantity = eval_quantity_string('2 picoseconds')
    assert quantity == 2 * unit.picosecond
def test_eval_quantity_string():
    assert eval_quantity_string("2 picoseconds") == 2 * unit.picoseconds
    assert eval_quantity_string("2picoseconds") == 2 * unit.picoseconds
    assert eval_quantity_string("2 / picoseconds") == 2 / unit.picoseconds
    assert eval_quantity_string("2 nanosecond") == 2 * unit.nanoseconds
Beispiel #5
0
def test_eval_quantity_string():
    quantity = eval_quantity_string('2 picoseconds')
    assert quantity == 2 * unit.picosecond
Beispiel #6
0
def test_eval_quantity_string():
    assert eval_quantity_string('2 picoseconds') == 2 * unit.picoseconds
    assert eval_quantity_string('2picoseconds') == 2 * unit.picoseconds
    assert eval_quantity_string('2 / picoseconds') == 2 / unit.picoseconds
    assert eval_quantity_string('2 nanosecond') == 2 * unit.nanoseconds