Example #1
0
def opt(T=350):
    A = read('packed.gen')
    # A = press_mol(A)
    write_gulp_in(A, runword='opti conv qiterative ', T=T, lib='reax')
    print('\n-  running gulp optimize ...')
    system('gulp<inp-gulp>gulp.out')
    xyztotraj('his.xyz', mode='w')
Example #2
0
def nvt_wt(T=350,
           time_step=0.1,
           tot_step=100,
           gen='packed.gen',
           mode='w',
           wt=25):
    A = read(gen, index=-1)
    write_gulp_in(A,
                  runword='md conv qiterative ',
                  T=T,
                  time_step=time_step,
                  tot_step=tot_step,
                  lib='reax')
    print('\n-  running gulp nvt ...')
    system('nohup gulp<inp-gulp>gulp.out 2>&1 &')

    thread = popen('ps -aux | grep "gulp"')
    lines = thread.readlines()
    time.sleep(wt)
    for line in lines:
        l = line.split()
        if l[7] == 'R+' or l[7] == 'R':
            system('kill %s' % l[1])

    xyztotraj('his.xyz', mode=mode)
Example #3
0
def npt(T=350, time_step=0.1, tot_step=10.0):
    A = read('packed.gen')
    write_gulp_in(A,
                  runword='md conp',
                  T=T,
                  time_step=time_step,
                  tot_step=tot_step,
                  lib='reax')
    system('gulp<inp-gulp>gulp.out')
    xyztotraj('his.xyz')
Example #4
0
def nvt(T=350,time_step=0.1,tot_step=5000,gen='siesta.traj',index=-1,mode='w'):
    ''' a gulp MD run '''
    A = read(gen,index=index)
    write_gulp_in(A,runword='md qiterative conv',
                  T=T,
                  time_step=time_step,
                  tot_step=tot_step,
                  lib='reax')
    print('\n-  running gulp nvt ...')
    system('gulp<inp-gulp>gulp.out')
    xyztotraj('his.xyz',mode=mode)
Example #5
0
def nvt(T=350, time_step=0.1, tot_step=100, gen='packed.gen', mode='w'):
    A = read(gen, index=-1)
    write_gulp_in(A,
                  runword='md qiterative conv',
                  T=T,
                  time_step=time_step,
                  tot_step=tot_step,
                  lib='reax')
    print('\n-  running gulp nvt ...')
    system('gulp<inp-gulp>gulp.out')
    xyztotraj('his.xyz', mode=mode)
Example #6
0
def x(mode='w'):
    xyztotraj('his.xyz',mode=mode)