Exemple #1
0
def run_short_ci(model_input, cuda_device_index, long_check=True):
    start_dir = os.getcwd()
    model, xml_path = prepare.prepare(model_input, force_overwrite=False)

    model_dir = os.path.dirname(xml_path)
    model.anchor_rootdir = os.path.abspath(model_dir)
    check.check_pre_simulation_all(model)
    run.run(model,
            "any",
            min_b_surface_simulation_length=1000,
            num_rev_launches=10,
            cuda_device_index=cuda_device_index,
            save_state_file=True)
    data_sample_list = converge.converge(model, k_on_state=0)
    rmsd_convergence_results = common_converge.calc_RMSD_conv_amount(
        model, data_sample_list)
    transition_minima, transition_details, transition_times \
        = common_converge.calc_transition_steps(
        model, data_sample_list[-1])
    converge.print_convergence_results(
        model,
        rmsd_convergence_results,
        cutoff=0.1,
        transition_results=transition_details,
        transition_time_results=transition_times,
        minimum_anchor_transitions=10,
        bd_transition_counts=data_sample_list[-1].bd_transition_counts)
    check.check_post_simulation_all(model, long_check=long_check)
    analysis = analyze.analyze(model)
    analysis.print_results()
    os.chdir(start_dir)
    return
Exemple #2
0
def toy_elber_model_persistent(toy_elber_model_input_persistent):
    """
    Create a model object that is persistent across the tests in this file.
    """
    os.chdir(TEST_DIRECTORY)
    toy_elber_model_obj, model_xml_path \
        = prepare.prepare(toy_elber_model_input_persistent,
                          force_overwrite=False)
    model_dir = os.path.dirname(model_xml_path)
    toy_elber_model_obj.anchor_rootdir = os.path.abspath(model_dir)
    return toy_elber_model_obj
Exemple #3
0
def rmsd_mmvt_model_persistent(rmsd_mmvt_model_input_persistent):
    """
    Create a model object that is persistent across the tests in this file.
    """
    os.chdir(TEST_DIRECTORY)
    rmsd_mmvt_model_obj, model_xml_path \
        = prepare.prepare(rmsd_mmvt_model_input_persistent,
                          force_overwrite=False)
    model_dir = os.path.dirname(model_xml_path)
    rmsd_mmvt_model_obj.anchor_rootdir = os.path.abspath(model_dir)
    rmsd_mmvt_model_obj.openmm_settings.cuda_platform_settings = None
    rmsd_mmvt_model_obj.openmm_settings.reference_platform = True
    return rmsd_mmvt_model_obj
Exemple #4
0
def host_guest_mmvt_model_persistent_forcefield(
        host_guest_mmvt_model_input_persistent_forcefield):
    """
    Create a model object that is persistent across the tests in this file.
    Uses an OpenMM forcefield input.
    """
    os.chdir(TEST_DIRECTORY)
    host_guest_mmvt_model_obj, model_xml_path \
        = prepare.prepare(host_guest_mmvt_model_input_persistent_forcefield,
                          force_overwrite=False)
    model_dir = os.path.dirname(model_xml_path)
    host_guest_mmvt_model_obj.anchor_rootdir = os.path.abspath(model_dir)
    return host_guest_mmvt_model_obj
Exemple #5
0
def toy_multi_model_persistent(toy_multi_model_input_persistent):
    """
    Create a model object that is persistent across the tests in this file.
    """
    os.chdir(TEST_DIRECTORY)
    toy_multi_model_obj, model_xml_path \
        = prepare.prepare(toy_multi_model_input_persistent,
                          force_overwrite=False)
    model_dir = os.path.dirname(model_xml_path)
    toy_multi_model_obj.anchor_rootdir = os.path.abspath(model_dir)
    toy_multi_model_obj.anchors[0].starting_positions = np.array(
        [[[-0.7, -0.7, 0.0]]])

    return toy_multi_model_obj
Exemple #6
0
def host_guest_mmvt_model_persistent_npt(
        tmpdir_factory, host_guest_mmvt_model_input_persistent):
    """
    Create a model object that is persistent across the tests in this file.
    It uses the NAMD engine.
    """
    os.chdir(TEST_DIRECTORY)
    host_guest_mmvt_model_input_persistent.ensemble = "npt"
    rootdir = tmpdir_factory.mktemp("hostguest_mmvt_npt")
    host_guest_mmvt_model_input_persistent.root_directory = rootdir
    host_guest_mmvt_model_input_persistent.browndye_settings_input = None
    host_guest_mmvt_model_obj, model_xml_path \
        = prepare.prepare(host_guest_mmvt_model_input_persistent,
                          force_overwrite=False)
    model_dir = os.path.dirname(model_xml_path)
    host_guest_mmvt_model_obj.anchor_rootdir = os.path.abspath(model_dir)
    return host_guest_mmvt_model_obj
Exemple #7
0
def host_guest_mmvt_model_persistent_namd(
        tmpdir_factory, host_guest_mmvt_model_input_persistent):
    """
    Create a model object that is persistent across the tests in this file.
    It uses the NAMD engine.
    """
    os.chdir(TEST_DIRECTORY)
    host_guest_mmvt_model_input_persistent.md_program = "namd"
    host_guest_mmvt_model_input_persistent.waterModel = "tip3p"
    rootdir = tmpdir_factory.mktemp("hostguest_mmvt_namd")
    host_guest_mmvt_model_input_persistent.root_directory = rootdir
    host_guest_mmvt_model_input_persistent.browndye_settings_input = None
    host_guest_mmvt_model_obj, model_xml_path \
        = prepare.prepare(host_guest_mmvt_model_input_persistent,
                          force_overwrite=False)
    model_dir = os.path.dirname(model_xml_path)
    host_guest_mmvt_model_obj.anchor_rootdir = os.path.abspath(model_dir)
    host_guest_mmvt_model_obj.namd_settings.PMEGridSpacing = None
    return host_guest_mmvt_model_obj