[ase-users] BEEF-vdW ensemble mean vs energy
Eric Hermes
ehermes at chem.wisc.edu
Thu Apr 20 16:25:35 CEST 2017
On Thu, 2017-04-20 at 13:34 +0000, Manuel Šaric via ase-users wrote:
> Hi Rune,
>
> Thanks for the answer.
>
> I noticed the same thing.
> I don't understand the reason behind this?
> Why would there be an offset between the potential energy and the
> mean of the ensemble?
> Is there any meaning to this difference?
> For some reason I feel like I remember that there wasn't always an
> offset there once upon a time.
>
> I also noticed that there is a very small difference between the
> energy of a balanced reaction and the mean of the ensemble of a
> balanced reaction.
> This difference is usually of the order of 0.005 eV (you can also see
> it in your example).
> To me this looks like there is a cancellation of some terms going on
> here (when dealing with the ensemble vs potential energy).
> It's like the energies in the ensemble don't include the same details
> as the potential energy but by taking a reasonable difference these
> details end up cancelling out.
>
> Plus, it seems like this offset between the energy and the mean of
> the ensemble increases with the size of the system (which maybe makes
> sense since the magnitudes of the energies are getting larger).
>
> Kind regards,
>
> Manuel
Manuel,
The BEEF-vdW potential energy is determined through the use of a single
set of 30 optimized parameters for the GGA exchange enhancement factor
and one parameter controlling the relative amount of PBE and LDA
correlation. The error is estimated by calculating the non-self-
consistent energy using the BEEF-vdW functional with an ensemble of
those 31 parameters selected so as to approximately match the
uncertainty of the optimized BEEF-vdW energy. In general, the
expectation value of a system's energy over the ensemble is not
expected to match the energy determined using the optimized set of
parameters.
In practice, you find that energy differences seem to show decent
agreement between the optimized value and the ensemble average. This is
because BEEF-vdW was trained to reproduce energy differences, not
absolute energies. As such, the absolute energy of a system may vary
substantially across the ensemble of parameters, but energy differences
vary to a much lesser extent -- and the extent to which energy
differences vary across the ensemble should be a measure of the
uncertainty of your single energy.
Eric
>
> ________________________________________
> From: ase-users-bounces at listserv.fysik.dtu.dk [ase-users-bounces at list
> serv.fysik.dtu.dk] on behalf of Rune Christensen via ase-users [ase-u
> sers at listserv.fysik.dtu.dk]
> Sent: Thursday, April 20, 2017 10:48 AM
> To: ase-users at listserv.fysik.dtu.dk
> Subject: Re: [ase-users] BEEF-vdW ensemble mean vs energy
>
> Hi Manuel
>
> That is only true for balanced reactions. For individual calculations
> there is an offset.
>
> In the below I have calculated electronic energies of OH* on Pt111
> with the main BEEF-vdW functional and a BEEF ensemble of size 2000.
>
> OH*@Pt_slab Pt_slab H2 H2O OH*@Pt_slab+H
> 2/2- Pt_slab - H2O
> E_U -65.80235945 -57.14552399 -7.458367 -
> 13.123977 0.73795804
> <ENS> -59.35023216 -50.93147788 -7.411974999 -
> 12.865059 0.74031721
> diff -6.452127285 -6.21404611 -0.046392001 -
> 0.258918005 -0.00235917
>
> The difference between the electronic energy with the BEEF-vdW main
> functional and the ensemble average is in some cases quite large.
> However, when you balance the reaction to calculate the adsorption
> energy (right most column) you will see that the difference is nearly
> gone.
>
> Best,
> Rune
>
>
> ________________________________________
> Fra: ase-users-bounces at listserv.fysik.dtu.dk [ase-users-bounces at lists
> erv.fysik.dtu.dk] på vegne af ase-users-request at listserv.fysik.d
> tu.dk [ase-users-request at listserv.fysik.dtu.dk]
> Sendt: 20. april 2017 09:55
> Til: ase-users at listserv.fysik.dtu.dk
> Emne: ase-users Digest, Vol 106, Issue 17
>
> Send ase-users mailing list submissions to
> ase-users at listserv.fysik.dtu.dk
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
> or, via email, send a message with subject or body 'help' to
> ase-users-request at listserv.fysik.dtu.dk
>
> You can reach the person managing the list at
> ase-users-owner at listserv.fysik.dtu.dk
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ase-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Split POSCAR/CONTCAR files (Oscar Xavier Guerrero)
> 2. BEEF-vdW ensemble mean vs energy (Manuel ?aric)
>
>
> -------------------------------------------------------------------
> ---
>
> Message: 1
> Date: Wed, 19 Apr 2017 11:11:35 -0500
> From: Oscar Xavier Guerrero <oscarxavier.ox at gmail.com>
> To: fabian <Fabian.T89 at web.de>
> Cc: ase-users <ase-users at listserv.fysik.dtu.dk>
> Subject: Re: [ase-users] Split POSCAR/CONTCAR files
> Message-ID:
> <CAM0Hkbf+icJDMPY1297CkebBfVCAV5Hd3PD33Jk71sPDwJRBqA at mail.gma
> il.com>
> Content-Type: text/plain; charset="utf-8"
>
> No, you would have to use in:
>
> slab_elms = ['Cu', 'O']
> slab_i = [a.index for a in atoms if a.symbol *in slab_elms*]
>
> This is correct only if you have no O in your adsorbate. Otherwise,
> it
> would be better to use height to separate.
>
>
> 2017-04-19 2:56 GMT-05:00 fabian <Fabian.T89 at web.de>:
>
> > Dear Oscar,
> > Thank you very much for your fast reply! This is exactly what i
> > want to do!
> >
> >
> > If my slab consist of different species , for example Cu and O
> > atoms, is
> > it correct to change this line
> >
> >
> > slab_i = [a.index for a in atoms if a.symbol == 'Cu']
> >
> >
> > to
> >
> >
> >
> > slab_i = [a.index for a in atoms if a.symbol == 'Cu','O'] ?
> >
> >
> > All the best
> >
> >
> > fabian
> >
> >
> > Am 18.04.2017 um 23:25 schrieb Oscar Xavier Guerrero:
> >
> > Sorry, in the previous example I forgot to convert from list to an
> > atoms
> > object.
> >
> > This should work:
> >
> > from ase.io import read, write
> > from ase.atoms import Atoms
> > atoms = read('CONTCAR')
> > # assuming the slab is only composed of Cu and the adsorbate has no
> > Cu
> > slab_i = [a.index for a in atoms if a.symbol == 'Cu']
> > ads_i = [a.index for a in atoms if a.symbol != 'Cu']
> > # you could also use height as the threshold
> > th = max(a.z for a in atoms if a.symbol == 'Cu')
> > # you can also use constraints to set the th
> > slb = {atoms[i].symbol for i in atoms.constraints[0].index}
> > th = max(a.z for a in atoms if a.symbol in alb)
> >
> > slab_i = [a.index for a in atoms if a.z <= th]
> > ads_i = [a.index for a in atoms if a.z > th]
> >
> > # this is a quick fix, maybe there's a better method
> > slab = atoms.copy()
> > for i in sorted(ads_i, reverse=True):
> > del slab[i]
> > ads = atoms.copy()
> > for i in sorted(slab_i, reverse=True):
> > del ads[i]
> >
> > # or you could use Atoms
> > slab = Atoms([a for a in atoms if a.index in slab_i])
> > ads = Atoms([a for a in atoms if a.index in ads_i])
> > cell = atoms.get_cell()
> > slab.set_cell(cell)
> > ads.set_cell(cell)
> > constraint = atoms.constraints[0]
> > slab.set_constraints(constraint)
> > ads.set_constraints(constraint)
> >
> > write('slab.vasp', slab, vasp5=True, sort=True, direct=True,
> > format='vasp')
> > write('ads.vasp', ads, vasp5=True, sort=True, direct=True,
> > format='vasp')
> >
> > If you have any questions I'm happy to help.
> >
> >
> > 2017-04-18 15:53 GMT-05:00 Oscar Xavier Guerrero <oscarxavier.ox at gm
> > ail.com
> > > :
> > > Hello Fabian,
> > >
> > > You can read POSCAR/CONTCAR files with ase.io.read, you get an
> > > atoms
> > > object with all the information the file had. Then you can copy
> > > parts of
> > > that atoms object into other atoms object. Then use the
> > > ase.io.write
> > > function to write POSCAR files for each of the new atoms objects.
> > > Since you
> > > have a slab and an adsorbate, you can use the height as a
> > > threshold. It
> > > really depends on your systems.
> > >
> > > Here's an example:
> > >
> > > from ase.io import read, write
> > > atoms = read('CONTCAR')
> > > # assuming the slab is only composed of Cu and the adsorbate has
> > > no Cu
> > > slab = [a for a in atoms if a.symbol == 'Cu']
> > > ads = [a for a in atoms if a.symbol != 'Cu']
> > > # you could also use height as the threshold
> > > th = max(a.z for a in atoms if a.symbol == 'Cu')
> > > # you can also use constraints to set the th
> > > slb = {atoms[i].symbol for i in atoms.constraints[0].index}
> > > th = max(a.z for a in atoms if a.symbol in alb)
> > >
> > > slab = [a for a in atoms if a.z <= th]
> > > ads = [a for a in atoms if a.z > th]
> > >
> > > write('slab.vasp', slab, vasp5=True, sort=True, direct=True,
> > > format='vasp')
> > > write('ads.vasp', ads, vasp5=True, sort=True, direct=True,
> > > format='vasp')
> > >
> > > If you have any questions I'm happy to help.
> > >
> > > P.S. heres my github with some of my scripts. https://github.com/
> > > iz
> > > xle/VaspTools
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2017-04-18 2:52 GMT-05:00 fabian via ase-users <
> > > ase-users at listserv.fysik.dtu.dk>:
> > >
> > > > Dear all,
> > > >
> > > > I want to perform a series of charge density difference
> > > > calculations. Therefore i want to split the geometry optimised
> > > > CONTCAR file
> > > > containing the coordinates from the slab and the Molecule into
> > > > tow files containing only slab or Molecule coordinates. At the
> > > > moment i am doing this
> > > > manually. Can someone give me a hint how to read positions and
> > > > constraints as well as atom types from the POSCAR/CONTCAR files
> > > > and later write them into two new POSCAR Files?
> > > > I would like to be able to either fix all atomic coordinates or
> > > > leave the as they are.
> > > > Atom types could also be extracted from OUTCAR or POTCAR files.
> > > > For now it is sufficient to perform the split based on the ATOM
> > > > tag.
> > > > Unfortunately i am completely stuck.
> > > >
> > > > All the best
> > > >
> > > > fabian
> > > >
> > > >
> > > > _______________________________________________
> > > > 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/20
> 170419/cf3362d9/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 20 Apr 2017 07:55:39 +0000
> From: Manuel ?aric <msaric at fysik.dtu.dk>
> To: "ase-users at listserv.fysik.dtu.dk"
> <ase-users at listserv.fysik.dtu.dk>
> Subject: [ase-users] BEEF-vdW ensemble mean vs energy
> Message-ID:
> <1CA2EC7E0C81D94593070449293978AE1D589FDF at ait-pex02mbx04.win.
> dtu.dk>
> Content-Type: text/plain; charset="Windows-1252"
>
> Hi everyone,
>
> I have a question about something that I'm not sure I quite
> understand.
>
> Let's say I have a system and I do a calculation with BEEF-vdW.
> I can get the ensemble of that system (ens) and the potential energy
> (e).
>
> Shouldn't the mean of the ensemble (ens) give the potential energy
> (e)?
>
> mean(ens) == e ???
>
> Cheers,
>
> Manuel
>
>
> ------------------------------
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
> End of ase-users Digest, Vol 106, Issue 17
> ******************************************
>
> _______________________________________________
> 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
More information about the ase-users
mailing list