[gpaw-users] How to set number of bands for automation of calculations for effective parallelization
Marcin Dulak
Marcin.Dulak at fysik.dtu.dk
Wed Nov 21 18:01:04 CET 2012
Hi,
On 11/21/12 17:27, mohnish pandey wrote:
> Dear GPAW users,
>
> I want to automate the calculation of several compounds. But the
> problem which I am facing is parallelizing the process effectively. I
> want to set the number of bands as the multiple of 8 so that I can
> parallelize effectively, but for that I need to have good initial
> guess for the number of bands for the particular system. I was
> wondering if there exist any option to get the number of
> bands(*initial_bands*) (which is equal to number of atomic orbitals by
> default) a priori and then using something like '*nbands =
> 8*int((initial_bands+8)/8) *to make it a multiple of four. Thanks a
> lot in advance.
from gpaw.mpi import serial_comm, rank, size, world
...
calc = GPAW(communicator=serial_comm) # if you run in planewave mode
atoms.set_calculator(calc)
calc.initialize(atoms)
*initial_bands* = calc.wfs.setups.nao
nbands = something that may depend on size, initial_bands
calc.set(nbands=nbands)
calc.set(basis='dzp') # in order to have enough bands if you run in
planewave mode
calc.set(communicator=world) # if you run in planewave mode
atoms.set_calculator(calc)
atoms.get_potential_energy()
Note that by changing number of bands you can affect SCF convergence:
https://listserv.fysik.dtu.dk/pipermail/gpaw-developers/2012-September/003165.html
Marcin
>
> --
> Regards,
> MOHNISH,
> -----------------------------------------------------------------
> Mohnish Pandey,
> PhD Student,
> Center for Atomic Scale Materials Design,
> Department of Physics,
> Technical University of Denmark
> -----------------------------------------------------------------
>
>
>
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20121121/8a83f595/attachment.html
More information about the gpaw-users
mailing list