print "initialise md" #print md.__doc__ mdrun = md(dt, nmd, T, slist, xyz, harmonic=True, dyn=dyn, nrep=nrep, npie=8) #mdrun = md(dt,nmd,T,slist,xyz,harmonic=True,dyn=dyn,nrep=nrep,npie=2) #mdrun.setDyn(eph.DynMat) #mdrun.SetSyslist(syslist) #mdrun.SetHarm(True) #mdrun.SetMD(dt,nmd) #mdrun.SetT(T) #------------------------------------------------------------------------------------- #initialise siesta run #def __init__(self,label,xyz,cell,mesh=100.,dmtol=0.001,constraints=[],lunit="Ang",eunit="eV"): constraints = [[1, 25], [-75, -1]] srun = siesta("mdrun", xyz, cell, constraints=constraints, tdir="CGrun/") print srun.els mdrun.AddSint(srun) mdrun.sint.start() #print potforce(None,N.zeros(3*len(slist))) #mdrun.sint.quit() #sys.exit() #--------------------------------------------------------------------------------- #debye bath #--------------------------------------------------------------------------------- #def __init__(self,T,cats,debye,nw,dt=None,nmd=None,ml=None,mcof=2.0,\ # gamma=None,gwl=None,K00=None,K01=None,V01=None): # initialise a phonon bath with debye damping # phl = phbath(300,[0,1,2,3,4,5,6,7,8,9,10,11,12],0.022,100,mdrun.dt,mdrun.nmd)
geom = cutlayers(fn[0], nalayer=nperlayer, nl=cut, nr=cut, outfile="STRUCT.fdf") cell, xyzonly, snr, anr = geom.pbc, geom.xyz, geom.snr, geom.anr print anr #xyz with element labels #for example ['Au',0,0,0] xyz = [[PeriodicTable[a], b[0], b[1], b[2]] for (a, b) in zip(anr, xyzonly)] print xyz #------------------------------------------------------------------------------------- #initialise siesta run #def __init__(self,label,xyz,cell,mesh=100.,dmtol=0.001,constraints=[],lunit="Ang",eunit="eV"): srun = siesta("mdrun", xyz, cell, mesh=mesh, dmtol=dmtol, tdir=SDir) print srun.els srun.start() #forces... #q is 1d array made from #the displacement from equilibrium in unit of 0.06466 Ang., #which is the internal unit of md q = N.zeros(len(xyz)) print q srun.force(q) srun.quit()
harmonic=False, dyn=N.zeros((3 * natoms, 3 * natoms)), nrep=1) print test.xyz #test.setDyn(eph.DynMat) #syslist=range(len(eph.DynMat)/3) #test.SetSyslist(syslist) #test.SetHarm(True) #test.SetMD(dt,nmd) #test.SetT(T) #------------------------------------------------------------------------------------- #initialise siesta run #def __init__(self,label,xyz,cell,mesh=100.,dmtol=0.001,constraints=[],lunit="Ang",eunit="eV"): srun = siesta("test", xyz, cell, constraints=[]) print srun.els test.AddSint(srun) test.sint.start() #print potforce(None,N.zeros(3*len(slist))) #test.sint.quit() #sys.exit() #--------------------------------------------------------------------------------- #debye bath #--------------------------------------------------------------------------------- #def __init__(self,T,cats,debye,nw,dt=None,nmd=None,ml=None,mcof=2.0,\ # gamma=None,gwl=None,K00=None,K01=None,V01=None): # initialise a phonon bath with debye damping # phl = phbath(300,[0,1,2,3,4,5,6,7,8,9,10,11,12],0.022,100,test.dt,test.nmd)
print "initialise md" print md.__doc__ test = md(dt, nmd, T, slist, xyz, harmonic=False, dyn=eph.DynMat) print test.xyz #test.setDyn(eph.DynMat) #syslist=range(len(eph.DynMat)/3) #test.SetSyslist(syslist) #test.SetHarm(True) #test.SetMD(dt,nmd) #test.SetT(T) #------------------------------------------------------------------------------------- #initialise siesta run #def __init__(self,label,xyz,cell,mesh=100.,dmtol=0.001,constraints=[],lunit="Ang",eunit="eV"): srun = siesta("test", xyz, mdmath.cell, constraints=[[1, 32], [46, -1]]) print srun.els test.AddSint(srun) test.sint.start() #print potforce(None,N.zeros(3*len(slist))) #srun.quit() #--------------------------------------------------------------------------------- #debye bath #--------------------------------------------------------------------------------- #def __init__(self,T,cats,debye,nw,dt=None,nmd=None,ml=None,mcof=2.0,\ # gamma=None,gwl=None,K00=None,K01=None,V01=None): # initialise a phonon bath with debye damping # phl = phbath(300,[0,1,2,3,4,5,6,7,8,9,10,11,12],0.022,100,test.dt,test.nmd) # phl.gnoi()