[ase-users] Fooling ASE to just write the input files...

Jonas Björk jonbj at ifm.liu.se
Tue Aug 2 10:48:13 CEST 2011


Hi,

The source code is in ase/calculators/vasp.py

Basically the last 6 lines of the initialize() method make calls to other methods that write the input files necessary to run VASP. The update I did of the interface was basically just moving these lines from calculate() method to the initialize method. 

All you need to generate the input files is to follow the example below.

I hope this helps.

Cheers,
Jonas

On Aug 1, 2011, at 8:22 PM, root wrote:

> Hi Jonas,
> 
> Can you explain how you updated the interface? I want to use your way to generate the input files, however, I have no idea how you modified the source code and where to find it. 
> Thanks a lot.
> 
> 
> 2011/6/30 Jonas Björk <jonbj at ifm.liu.se>
> Hi again,
> 
> I updated the interface, now it is enough to do:
> 
> atoms = Atoms(...)
> calc = Vasp()
> calc.initialize(atoms)
> 
> and the POSCAR, POTCAR, KPOINTS and INCAR files will be generated.
> 
> Cheers,
> Jonas
> 
> On Jun 30, 2011, at 6:00 PM, Jonas Björk wrote:
> 
> > Hi Chaitanya!
> >
> > You could try something like (assuming also the rest of you code is included)
> >
> > calc.initialize(atoms)
> > vasp.write_vasp('POSCAR', calc.atoms_sorted, symbol_count = calc.symbol_count)
> > calc.write_incar(atoms)
> > calc.write_kpoints()
> > calc.write_potcar()
> >
> > Cheers,
> > Jonas
> >
> >
> > On Jun 30, 2011, at 4:44 PM, Chaitanya Krishna wrote:
> >
> >> Hello,
> >>
> >> I am wondering if there is a way to fool ASE into just writing the
> >> input files without actually starting a calculation. I would basically
> >> first like to set up all my files, manually check if everything is Ok
> >> and then start the calculation myself. I haven't been able to figure
> >> out how to do this yet.
> >>
> >> Any help is appreciated. I include a sample script that I have written
> >> at the end.
> >>
> >> Best regards,
> >> Chaitanya
> >>
> >> from ase.lattice.spacegroup import crystal
> >> from ase.io import vasp
> >> from ase.calculators.vasp import Vasp
> >>
> >> a = 3.9236
> >> pt = crystal('Pt', [(0, 0, 0)], spacegroup=225, cellpar=[a,a,a,90,90,90])
> >> print pt
> >>
> >> vasp.write_vasp('POSCAR', pt, direct=True, sort=True)
> >> calc = Vasp(prec='Accurate', xc='PW91', lreal=True, kpts=(10,10,10))
> >> pt.set_calculator(calc)
> >>
> >> # How do I just write the input files without actually starting a calculation?
> >> # pt.get_potential_energy()
> >>
> >> --
> >> 42
> >> _______________________________________________
> >> ase-users mailing list
> >> ase-users at listserv.fysik.dtu.dk
> >> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
> >
> >
> > _______________________________________________
> > ase-users mailing list
> > ase-users at listserv.fysik.dtu.dk
> > https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
> 
> 
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20110802/1261a77b/attachment.html>


More information about the ase-users mailing list