[ase-users] VASP module in ASE

Jonas Björk j.bjork at liverpool.ac.uk
Mon Sep 1 17:45:16 CEST 2008


On Mon, 2008-09-01 at 17:20 +0200, Jens Jørgen Mortensen wrote:
> On Mon, 2008-09-01 at 15:23 +0100, Jonas Björk wrote:
> > In Vasp when writing out the k-points explicitly you can decide
> whether
> > writing them in Cartesian coordinates (units of 2pi/a) or in
> reciprocal
> > coordinates (units b1, b2, b3). What is the standard in ASE?
> 
> Units of 2pi/a - usually in the range from -0.5 to 0.5.

OK, thanks.

> 
> > > +
> > > +        # How can this ever work?  In ASE, we don't assume that the
> > > +        # atoms are ordered in any way?
> > > +        atom_num=[[num[0],1]]                 ???
> > > +        for m in range(1,len(num)):           ???
> > > +            if num[m]==atom_num[-1][0]:       ???
> > > +                atom_num[-1][1]+=1            ???
> > > +            else:                             ???
> > > +                atom_num.append([num[m], 1])  ???
> > > 
> > > ??? Here you are assuming that the atoms are ordered after atomic
> number
> > > - right?  We should fix that!
> > 
> > I am not assuming anything about the ordering of the atoms here, at
> > least not if I understand ASE right:
> > 
> > 
> > First I get a list of the chemical symbols of each atom. I should
> change
> > the name 'num' to 'symbols' or something else more appropriate. 
> > 
> >       num = atoms.get_chemical_symbols()
> > 
> >         # How can this ever work?  In ASE, we don't assume that the
> >         # atoms are ordered in any way?
> > 
> > Then count how many atoms of the SAME species in a row in the Atoms
> > list. 
> > 
> > For example if the get_chemical_symbols() gives a list like this:
> > 
> > ['C', 'C', 'C', 'H', 'H', 'H', 'C', 'C', 'O']
> > the atom_num will take the form:
> > 
> > [['C', 6], ['H', 3], ['C', 2], ['O',1]]
> 
> I guess you mean:
> 
> [['C', 3], ['H', 3], ['C', 2], ['O',1]]
> 
> Anyway - I understand now.
> 
> > and the first rows in the Vasp atomic position file (POSCAR) will look
> > like this:
> > 
> >   C H C O
> >     1.0
> >     1.0 0 0
> >     0 1.0 0
> >     0 0 1.0 
> >   6 3 2 1
> > 
> > The first row is just a label, standard is to write out the atomic
> > species here (makes it possible for e.g. VMD to figure out the atomic
> > species from just the POSCAR file).
> > The next four rows has the unit cell vectors and a scaling parameter.
> > The sixth row has information about the number of atomic species of
> each
> > kind. In this case, first there will be 6 atoms of the same kind,
> > followed by 3 atoms of same kind, 2 atoms of same kind and 1 single
> > atom.
> > 
> > When Vasp runs it will look in what order the POTCAR file is built to
> > figure out which pseudo potential should be assigned to which group of
> > atoms. In this case it will build the POTCAR file by joining a carbon
> > POTCAR file, hydrogen POTCAR file, carbon (again), oxygen. With this
> > order. 
> > 
> > It would be possible to build the POSCAR and POTCAR file only using
> the
> > get_chemical_symbols() and assign a pseudo potential to each
> individual
> > atom. But what we would end up with is a really messy POSCAR file with
> a
> > number 1 for each atom in the sixth row, and an unnecessary large
> POTCAR
> > file.
> 
> Let's say I want to do 256 water molecules, and the order is
> HHOHHOHHOHHO ..., then I will also get a HUGE POTCAR file.  I think it
> would be best if the ASE Vasp interface could be intelligent and reorder
> things so that the POTCAR file only has two setups.

I agree, lets do it this way. 


Jonas





More information about the ase-users mailing list