def test_xenon_42_multi(): A = add(1, 1) B = sub(3, A) multiples = [mul(add(i, B), A) for i in range(6)] C = schedule(sum)(gather_all(multiples)) machine = Machine( scheduler_adaptor='slurm', location='ssh://fs0.das5.cs.vu.nl/home/jhidding', credential=xenon.CertificateCredential( username='******', certfile='/home/johannes/.ssh/id_rsa'), jobs_properties={ 'xenon.adaptors.schedulers.ssh.strictHostKeyChecking': 'false' }) worker_config = XenonJobConfig( prefix=Path('/home/jhidding/.local/share/workon/mcfly'), working_dir='/home/jhidding/', time_out=1000000000000, verbose=False) # , options=['-C', 'TitanX', '--gres=gpu:1']) result = run_xenon(C, machine=machine, worker_config=worker_config, n_processes=2) print("The answer is:", result)
def run(wf): xenon_config = XenonConfig( jobs_scheme='local' ) job_config = RemoteJobConfig( registry=registry, time_out=1000 ) with XenonKeeper() as Xe, NCDisplay() as display: result = run_xenon( wf, Xe, "cache.json", 2, xenon_config, job_config, display=display, deref=True) return result
def test_xenon_42_multi(xenon_server): A = add(1, 1) B = sub(3, A) multiples = [mul(add(i, B), A) for i in range(6)] C = schedule(sum)(gather_all(multiples)) machine = Machine() worker_config = XenonJobConfig(queue_name='multi', verbose=True) result = run_xenon(C, machine=machine, worker_config=worker_config, n_processes=2) assert (result == 42)
def test_xenon_42(): A = log_add(1, 1) B = sub(3, A) multiples = [mul(log_add(i, B), A) for i in range(6)] C = accumulate(noodles.gather(*multiples)) xenon_config = XenonConfig(jobs_scheme='local') job_config = RemoteJobConfig(registry=serial.base, time_out=1000) with XenonKeeper() as Xe, NCDisplay() as display: result = run_xenon(C, Xe, "cache.json", 2, xenon_config, job_config, display=display) assert (result == 42)
def test_xenon_42(): A = log_add(1, 1) B = sub(3, A) multiples = [mul(log_add(i, B), A) for i in range(6)] C = accumulate(noodles.gather(*multiples)) xenon_config = XenonConfig( jobs_scheme='local' ) job_config = RemoteJobConfig( registry=serial.base, time_out=1000 ) with XenonKeeper() as Xe, NCDisplay() as display: result = run_xenon( C, Xe, "cache.json", 2, xenon_config, job_config, display=display) assert(result == 42)
apprTS = select_max(lt, "energy") # Run the TS optimization, using the default TS template workflow = adf(templates.ts.overlay(settings), apprTS.molecule) from noodles.run.xenon import (XenonKeeper, XenonConfig, RemoteJobConfig, run_xenon) with XenonKeeper() as Xe: xenon_config = XenonConfig(jobs_scheme='slurm', location=None) job_config = RemoteJobConfig( registry=registry, prefix='/home/jhidding/venv', # the working_dir should exist and contain a file called worker.sh working_dir='/home/jhidding/qm-test', init=init, finish=finish, time_out=1) ts = run_xenon(Xe, 1, xenon_config, job_config, workflow) # Retrieve the molecular coordinates mol = ts.molecule r1 = mol.atoms[0].coords r2 = mol.atoms[4].coords print("TS Bond distance:", bond_distance(r1, r2)) print("TS Energy:", ts.energy)