maxmix=
    35,  #https://www.vasp.at/vasp-workshop/slides/handsonIV.pdf #for badly behaved clusters.
    voskown=0,
    ismear=1,
    sigma=0.1,
    isym=2,
    iwavpr=11)

mpirun = spawn.find_executable('mpirun')
vasp = '/home/mmm0007/vasp/vasp.5.4.1/bin/vasp_std'

vasp_client = VaspClient(client_id=0,
                         npj=96,
                         ppn=1,
                         exe=vasp,
                         mpirun=mpirun,
                         parmode='mpi',
                         ibrion=13,
                         nsw=1000000,
                         npar=4,
                         **vasp_args)

if not args.no_relax:
    traj = io.Trajectory('relaxation.traj', 'a', gam_cell)
    qm_pot = SocketCalculator(vasp_client)
    gam_cell.set_calculator(qm_pot)
    opt = PreconLBFGS(gam_cell)
    opt.attach(traj.write, interval=1)
    opt.run(fmax=args.fmax)
    traj.close()
    qm_pot.shutdown()
Exemple #2
0
vasp_client = VaspClient(client_id=0,
                         kpts=[16, 16, 1],
                         amix=0.01,
                         amin=0.001,
                         bmix=0.001,
                         amix_mag=0.01,
                         bmix_mag=0.001,
                         npj=npj,
                         ppn=ppn,
                         block=block,
                         corner=corner,
                         shape=shape,
                         exe=vasp,
                         ediffg=-0.05,
                         nelmin=6,
                         nelmdl=-15,
                         kpar=32,
                         parmode='cobalt',
                         xc='PBE',
                         lreal=False,
                         ibrion=13,
                         nsw=40,
                         algo='VeryFast',
                         npar=8,
                         lplane=False,
                         lwave=False,
                         lcharg=False,
                         nsim=1,
                         voskown=1,
                         ismear=1,
                         sigma=0.01,
                         iwavpr=11,
                         isym=2,
                         nelm=100)
block, corner, shape = list(block_corner_iter(blocks, npj))[0]
print block, corner, shape

vasp_client = VaspClient(client_id=0,
                         kpts=[14, 14, 14],
                         npj=npj,
                         ppn=ppn,
                         block=block,
                         corner=corner,
                         shape=shape,
                         exe=vasp,
                         parmode='cobalt',
                         xc='PBE',
                         lreal=False,
                         ibrion=13,
                         nsw=1000000,
                         algo='VeryFast',
                         npar=8,
                         lplane=False,
                         lwave=False,
                         lcharg=False,
                         nsim=1,
                         voskown=1,
                         ismear=0,
                         sigma=0.01,
                         iwavpr=11,
                         isym=0,
                         nelm=150)

sock_calc = SocketCalculator(vasp_client, ip=ip, bgq=True)
                        (0.5, 0.5, 0), (0.25, 0.25, 0.25), (0.25, 0.75, 0.75),
                        (0.75, 0.25, 0.75), (0.75, 0.75, 0.25)],
             pbc=True)
bulk.set_cell((a, a, a), scale_atoms=True)

vasp_client = VaspClient(client_id=0,
                         npj=1,
                         ppn=8,
                         exe=vasp,
                         mpirun=mpirun,
                         parmode='mpi',
                         xc='LDA',
                         lreal=False,
                         ibrion=13,
                         nsw=1000000,
                         algo='VeryFast',
                         npar=8,
                         lplane=False,
                         lwave=False,
                         lcharg=False,
                         nsim=1,
                         voskown=1,
                         ismear=0,
                         sigma=0.01,
                         iwavpr=11,
                         isym=0,
                         nelm=150)

sock_calc = SocketCalculator(vasp_client)

bulk.set_calculator(sock_calc)
sock_e = bulk.get_potential_energy()
Exemple #5
0
        qsub_args = 'qsub -A %s -n %d -t %d -q %s --mode script --disable_preboot %s' % \
            (acct, nodes, runtime, queue, ' '.join(sys.argv))
        print qsub_args
        os.system(qsub_args)
        sys.exit(1)

    blocks = get_bootable_blocks(partition, nodes)
    print('Available blocks: %s' % blocks)
    boot_blocks(blocks)

    qm_subblocks = [
        (i, bcs) for (i, bcs) in enumerate(block_corner_iter(blocks, qm_npj))
    ]
    print 'qm_subblocks', qm_subblocks
    qm_clients = [
        VaspClient(client_id, qm_exe, qm_env, qm_npj, qm_ppn, block, corner,
                   shape, jobname, **vasp_args)
        for client_id, (block, corner, shape) in qm_subblocks
    ]
else:
    qm_clients = []
    hostname, ip = '<dummy>', 0

print 'FEN hostname: %s' % hostname
print 'FEN server IP: %s' % ip
print 'QM nodes per job: %r' % qm_npj
print 'QM MPI tasks per node: %r' % qm_ppn
print 'Number of QM jobs: %d' % n_qm_jobs
print 'Total number of sub-block jobs: %d' % njobs
print 'Total number of nodes: %d' % nodes
# ******* End of parameters *************
Exemple #6
0
                      hysteretic_buffer=True,
                      hysteretic_buffer_inner_radius=hyst_buffer_inner,
                      hysteretic_buffer_outer_radius=hyst_buffer_outer,
                      min_images_only=True,
                      terminate=False,
                      force_no_fix_termination_clash=True,
                      randomise_buffer=False)

  vasp_args=dict(parmode='cobalt', xc='PBE', amix=0.01, amin=0.001, bmix=0.001, amix_mag=0.01, bmix_mag=0.001, 
                 kpts=[1, 1, 8], kpar=4, lreal='auto', ibrion=13, nsw=1000000, nelmdl=-15, ispin=2,
                 nelm=100, algo='VeryFast', npar=32, lplane=False, lwave=False, lcharg=False, istart=0,
                 voskown=1, ismear=1, sigma=0.1, isym=0) # possibly try iwavpr=12, should be faster if it works

  para_args  = dict(npj=npj, ppn=ppn, block=block, corner=corner, shape=shape)
  all_args   = dict(vasp_args.items() + para_args.items())
  qm_clients = [VaspClient(client_id=0, exe=vasp, **all_args)] 

##### Finished VASP INITIALIZATION AND SOCKET CONFIGURATION ######
##### MAIN PROGRAM ############

  if continuation:
      # restart from last frame of most recent trajectory file
      traj_files = sorted(glob.glob('[0-9]*.traj.xyz'))
      if len(traj_files) > 0:
          last_traj = traj_files[-1]
          input_file = last_traj #+ '@-1'

  print 'Loading atoms from file %s' % input_file
  atoms = Atoms(input_file)
  atoms = Atoms(atoms)