def p4b_run(saves):
    saves = p3_run(saves)
    if "first_string" not in saves:
        print("Creating VIS string object")
        saves["first_string"] = vc.VIS_string(start=saves["startVIS"],
                                              end=saves["endVIS"],
                                              string=saves["intermed"],
                                              no_CVs=2)
        save(saves)

    saves["first_string"].create_SO()
    if "b_act" not in saves:
        saves["b_act"] = str(saves["first_string"])
    save(saves)
    end_loc = saves["first_string"].run_swarms()
    save(saves)
    """
    print("before, intended:")
    print(np.array(saves["CVstates"]))
    print("before, actual:")
    print(saves["b_act"])
    print("\nafter:")
    print(end_loc)
    """
    return saves
Exemple #2
0
def p4b_run():
    #reuse = input("use previous run (y/n)")=="y"
    reuse = True
    #reuse = True
    debug = True
    #debug = False
    if reuse:
        saves = load()
        p3_run(saves)
    else:
        saves = p3_run({})
    if "first_string" not in saves:
        saves["first_string"] = vc.VIS_string(start=saves["startVIS"],
                                              end=saves["endVIS"],
                                              string=saves["intermed"],
                                              no_CVs=2)
        save(saves)
    saves["first_string"].create_SO()
    if "b_act" not in saves:
        saves["b_act"] = str(saves["first_string"])
    save(saves)
    end_loc = saves["first_string"].run_swarms()
    save(saves)
    print("before, intended:")
    print(np.array(saves["CVstates"]))
    print("before, actual:")
    print(saves["b_act"])
    print("\nafter:")
    print(end_loc)

    if debug:
        all_trajs(saves)
Exemple #3
0
def p4a_run():
    #reuse = input("use previous run (y/n)")=="y"
    reuse = False
    #reuse = True
    #debug = True
    debug = False
    if reuse:
        saves = load()
        p3_run(saves)
    else:
        saves = p3_run({})
    if "one" not in saves:
        saves["one"] = saves["intermed"][0]
        save(saves)
    if "first_swarm" not in saves or debug:
        saves["first_swarm"] = vc.VIS_swarm(saves["one"])
        save(saves)
    saves["first_swarm"].run_swarm()
    save(saves)
    aver = saves["first_swarm"].averages()
    aver = np.mean(aver, axis=0)
Exemple #4
0
import VIS_col as VC
from md_tools import *

if __name__ == "__main__":
    a = load()
    if a == {}:
        shutil.copyfile("topol_orig.top", "topol.top")
        a = VC.VIS_collection("parameters.smg")
    a.parse_parameters()
    a.prepare_endpoints()
    a.create_base_string()
    a.run_method()