if __name__ == "__main__": IS_QUEUE = True USERNAME = "******" #PASSWORD = getpass.getpass() PASSWORD = "******" if IS_QUEUE: logging.basicConfig(format='%(name)s:%(levelname)s:%(message)s', level=logging.INFO) else: logdir = str(pathlib.Path(".").resolve()) logging.basicConfig(filename = logdir + "/singlesites_workflow.log", level=logging.INFO) # set up the LaunchPad and reset it #launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD, server = "atlas") launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD, server = "serenity") #launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD, server = "serenity", lpadname = "mjfireworkstriton") #launchpad.reset('', require_password=False) wf = get_singlesites_workflow(username = "******", password = PASSWORD, template_path = str(pathlib.Path("../templates/cp2k_mm_energy.inp").resolve()), worker_target_path = "/wrk/jagermar/DONOTREMOVE/workflow_runs/singlesites/testruns/ptcu_db", extdb_ids = [1921,1922], reference_energy = -1.16195386047558 * 0.5, adsorbate_name = "H", chunk_size = 10, max_calculations = 50, adsite_types = ["top", "bridge"], #, "hollow"], n_max_restarts = 1, skip_dft = False,
from critcatworks.workflows import generate_nanoclusters_workflow from critcatworks.database import mylaunchpad if __name__ == "__main__": IS_QUEUE = True USERNAME = "******" #PASSWORD = getpass.getpass() PASSWORD = "******" if IS_QUEUE: logging.basicConfig(format='%(name)s:%(levelname)s:%(message)s', level=logging.INFO) else: logdir = str(pathlib.Path(".").resolve()) logging.basicConfig(filename = logdir + "/nanocluster_workflow.log", level=logging.INFO) # set up the LaunchPad and reset it launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD,) #launchpad.reset('', require_password=False) bondlength_dct = { "Fe" : 2.3, "Co" : 2.3, "Ni" : 2.4, "Cu" : 2.5, "Ti" : 2.7, "Pt" : 2.6,} wf = generate_nanoclusters_workflow(username = USERNAME, password = PASSWORD, worker_target_path = "/wrk/jagermar/DONOTREMOVE/workflow_runs/generator/testruns", extdb_connect = {}, shape = "ico", nanocluster_size = 3, compositions = [6, 13, 28, 42, 49], elements = ["Fe","Co", "Ni","Cu","Ti", "Pt"], generate_pure_nanoclusters = True, n_configurations = 10, n_initial_configurations = 100, bondlength_dct = bondlength_dct , ) # store workflow
IS_QUEUE = True USERNAME = "******" #PASSWORD = getpass.getpass() PASSWORD = "******" if IS_QUEUE: logging.basicConfig(format='%(name)s:%(levelname)s:%(message)s', level=logging.INFO) else: logdir = str(pathlib.Path(".").resolve()) logging.basicConfig(filename=logdir + "/uniquemolsites_workflow.log", level=logging.INFO) # set up the LaunchPad and reset it launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD, server="atlas") #launchpad.reset('', require_password=False) structures = read_structures_locally("../nc_structures") # setup nh3 molecule with anchor x pos = np.array([[0.00000000e+00, 0.00000000e+00, 1.16489000e-01], [0.00000000e+00, 9.39731000e-01, -2.71808000e-01], [8.13831000e-01, -4.69865000e-01, -2.71808000e-01], [-8.13831000e-01, -4.69865000e-01, -2.71808000e-01], [0.00000000e+00, -1.54520895e-06, 1.91648900e+00]]) adsorbate_x = ase.Atoms('NH3X', positions=pos) wf = get_uniquemolsites_workflow(
if __name__ == "__main__": import logging IS_QUEUE = True USERNAME = "******" PASSWORD = getpass.getpass() if IS_QUEUE: logging.basicConfig(format='%(name)s:%(levelname)s:%(message)s', level=logging.INFO) else: logdir = str(pathlib.Path(".").resolve()) logging.basicConfig(filename=logdir + "/coverage_workflow.log", level=logging.INFO) # set up the LaunchPad and reset it launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD, lpadname="mjfireworkstriton") #launchpad.reset('', require_password=False) wf = get_coverage_workflow( username="******", password=PASSWORD, template_path=str( pathlib.Path("./templates/triton_gopt.inp").resolve()), worker_target_path= "/scratch/work/jagerm1/workflow_runs/coverage/production/selected_ptni_clusters_topbridgehollow_nremaining80", extdb_ids=[245, 251], reference_energy=-1.16195386047558 * 0.5, adsorbate_name="H", max_iterations=4, adsite_types=[
logpath = "fw_logs" try: os.makedirs(logpath) except OSError as e: if e.errno != errno.EEXIST: raise abspath = str(pathlib.Path(logpath).resolve()) if IS_QUEUE: logging.basicConfig(format='%(name)s:%(levelname)s:%(message)s', level=logging.INFO) else: logging.basicConfig(filename = abspath + "/logfile_ranked_adsites.log", level=logging.INFO) USERNAME = "******" PASSWORD = "******" launchpad = mylaunchpad.create_launchpad(USERNAME, PASSWORD, server = "serenity", lpadname = "mjfireworks") with open('autogenerated_launchpad.yaml', 'w') as outfile: yaml.dump(launchpad.to_dict(), outfile, default_flow_style=False) # run the jobs found in the launchpad # (added previously by other routine) if IS_OFFLINE: rlaunch_command = "rlaunch singleshot --offline" else: lpad_abspath = str(pathlib.Path("autogenerated_launchpad.yaml").resolve()) rlaunch_command = "rlaunch -l " + lpad_abspath + " singleshot" print(rlaunch_command) if IS_QUEUE:
dummy fireworks Workflow """ # create the Firework consisting of multiple tasks firetask1 = TemplateWriterTask({'context': {'opt1': 5.0, 'opt2': 'fast method'}, 'template_file': 'simple_template.txt', 'output_file': 'inputs.txt'}) firetask2 = ScriptTask.from_str('wc -w < inputs.txt > words.txt') firetask3 = FileTransferTask({'files': [{'src': 'words.txt', 'dest': '~/words.txt'}], 'mode': 'copy'}) wf = Firework([firetask1, firetask2, firetask3]) return wf if __name__ == "__main__": import logging IS_QUEUE = False print("dummy workflow") if IS_QUEUE: logging.basicConfig(format='%(name)s:%(levelname)s:%(message)s', level=logging.INFO) else: logdir = str(pathlib.Path(".").resolve()) logging.basicConfig(filename = logdir + "/logfile_dummy_workflow.log", level=logging.INFO) # set up the LaunchPad and reset it launchpad = mylaunchpad.create_launchpad() launchpad.reset('', require_password=False) wf = dummy_workflow() # store workflow and launch it locally, single shot launchpad.add_wf(wf) #launch_rocket(launchpad, FWorker()) rapidfire(launchpad, FWorker())