[ase-users] [ase-developers] Units in ASE
Gaël Donval
gael.donval at cnrs-imn.fr
Wed Apr 3 17:16:32 CEST 2013
I've seen that. I changed masses in ASE and I don't get better
agreement: 5.358 eV (new calc) vs. 5.326 eV (VASP).
Kinetic energies calculated using ASE are still off.
Le mercredi 03 avril 2013 à 08:51 -0400, John Kitchin a écrit :
> It looks like VASP uses different masses than ase.data. Here is a
> comparison of what is in ase.data, vs POMASS in the POTCAR files. This
> could be some part of your differences.
>
>
> sym ase-mass vasp-mass delta
> X 0.000000None None
> H 1.007940 1.0 0.00794
> He 4.002600 4.0 0.0026
> Li 6.941000 7.01 -0.069
> Be 9.012180 9.013 -0.000819999999999
> B 10.811000 10.811 0.0
> C 12.011000 12.011 0.0
> N 14.006700 14.001 0.0057
> O 15.999400 16.0 -0.0006
> F 18.998400 18.998 0.000399999999999
> Ne 20.179700 20.18 -0.000299999999999
> Na 22.989770 22.99 -0.000229999999998
> Mg 24.305000 24.305 0.0
> Al 26.981540 26.982 -0.00046
> Si 28.085500 28.085 0.000499999999999
> P 30.973760 30.974 -0.000240000000002
> S 32.066000 32.066 0.0
> Cl 35.452700 35.453 -0.000300000000003
> Ar 39.948000 39.949 -0.000999999999998
> K 39.098300None None
> Ca 40.078000 40.078 0.0
> Sc 44.955900 44.956 -0.000100000000003
> Ti 47.880000 47.88 0.0
> V 50.941500 50.941 0.000499999999995
> Cr 51.996000 51.996 0.0
> Mn 54.938000 54.938 0.0
> Fe 55.847000 55.847 0.0
> Co 58.933200 58.933 0.0002
> Ni 58.693400 58.69 0.0034
> Cu 63.546000 63.546 0.0
> Zn 65.390000 65.39 0.0
> Ga 69.723000 69.723 0.0
> Ge 72.610000 72.61 0.0
> As 74.921600 74.922 -0.000399999999999
> Se 78.960000 78.96 0.0
> Br 79.904000 79.904 0.0
> Kr 83.800000 83.8 0.0
> Rb 85.467800None None
> Sr 87.620000 87.62 0.0
> Y 88.905900None None
> Zr 91.224000 91.224 0.0
> Nb 92.906400None None
> Mo 95.940000 95.94 0.0
> Tc nan 98.906 nan
> Ru 101.070000 101.07 0.0
> Rh 102.905500 102.906 -0.000500000000002
> Pd 106.420000 106.42 0.0
> Ag 107.868000 107.868 0.0
> Cd 112.410000 112.411 -0.001
> In 114.820000 114.82 0.0
> Sn 118.710000 118.71 0.0
> Sb 121.757000 121.75 0.00700000000001
> Te 127.600000 127.6 0.0
> I 126.904500 126.904 0.000500000000002
> Xe 131.290000 131.294 -0.00400000000002
> Cs 132.905400None None
> Ba 137.330000None None
> La 138.905500 138.9 0.00549999999998
> Ce 140.120000 140.115 0.005
> Pr 140.907700 140.907 0.000699999999995
> Nd 144.240000 144.24 0.0
> Pm nan 146.915 nan
> Sm 150.360000 150.36 0.0
> Eu 151.965000 151.965 0.0
> Gd 157.250000 157.25 0.0
> Tb 158.925300 158.925 0.000299999999982
> Dy 162.500000 162.5 0.0
> Ho 164.930300 164.93 0.000299999999982
> Er 167.260000 167.26 0.0
> Tm 168.934200 168.93 0.0042
> Yb 173.040000 173.04 0.0
> Lu 174.967000 174.967 0.0
> Hf 178.490000 178.49 0.0
> Ta 180.947900 180.948 -0.000100000000003
> W 183.850000 183.85 0.0
> Re 186.207000 186.207 0.0
> Os 190.200000 190.2 0.0
> Ir 192.220000 192.22 0.0
> Pt 195.080000 195.08 0.0
> Au 196.966500 196.966 0.000499999999988
> Hg 200.590000 200.59 0.0
> Tl 204.383000 204.38 0.00300000000001
> Pb 207.200000 207.2 0.0
> Bi 208.980400 208.98 0.000400000000013
> Po nan 208.942 nan
> At nan 209.987 nan
> Rn nan 22.017 nan
> Fr nanNone None
> Ra 226.025400None None
> Ac nan 227.028 nan
> Th 232.038100 232.039 -0.000900000000001
> Pa 231.035900 231.036 -0.000100000000003
> U 238.029000 238.029 0.0
> Np 237.048200 237.048 0.000200000000007
> Pu nan 244.064 nan
> Am nan 243.061 nan
> Cm nanNone None
> Bk nanNone None
> Cf nanNone None
> Es nanNone None
> Fm nanNone None
> Md nanNone None
> No nanNone None
> Lr nanNone None
> John
>
> -----------------------------------
> John Kitchin
> Associate Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>
>
>
> On Tue, Apr 2, 2013 at 12:33 PM, Gaël Donval <gael.donval at cnrs-imn.fr>wrote:
>
> > Dear all,
> >
> > I'm working on integrating VASP velocities in ASE.
> >
> > VASP always outputs velocities in A/fs (one can give velocities as
> > base_vector/time_step but this is not the point here).
> >
> > I had problems recalculating the kinetic energy and the temperature from
> > ASE using the appropriate functions: atoms.get_kinetic_energy() and
> > atoms.get_temperature(). Here is what I did:
> >
> > 1) Convert units to SI (I'm more comfortable with them):
> > mass_si = mass * ase.units._amu # Da to kg
> > v_si = v_vasp * 1e5 # A/fs to m/s
> >
> > 2) Calculate the kinetic energy in eV:
> > ((mass_si*(v_si**2).sum(axis=1)/2.)*units.J).sum() # in eV
> >
> > 3) Calculate the temperature in Kelvins:
> > (2*ekin/(3*len(atoms)))/units.kB
> >
> > I could compare 2) and 3) with the results given in VASP. Basically, I
> > get almost the same values, but not exactly (VASP: 5.326 eV,
> > Calculations: 5.313 eV). I'm curious to get your opinion about this
> > difference. I know the mass and the velocity with at least 6
> > significative figures ... I acknowledge that these results are close
> > from each other but I expect at the very least 4 identical figures here.
> > Maybe the masses...
> >
> >
> > This is not all. When I use ase and put the velocities in as m/s, just
> > like above, the calculated energies and temperatures are completely off
> > (by a factor of 100, Ek=0.05434 u. --this is not even 0.05313...).
> >
> > I guessed this was because of units. I can't change masses, but only
> > velocities. Since I have a factor of around 100, I just had to multiply
> > my velocities by 10. The problem is that I don't see how that would make
> > sensible units. Would anyone more familiar with atomic sets of units be
> > willing to shed light on this?
> >
> > Thanks in advance,
> > Gael
> >
> >
> > _______________________________________________
> > ase-developers mailing list
> > ase-developers at listserv.fysik.dtu.dk
> > https://listserv.fysik.dtu.dk/mailman/listinfo/ase-developers
> >
> It looks like VASP uses different masses than ase.data. Here is a
> comparison of what is in ase.data, vs POMASS in the POTCAR files. This
> could be some part of your differences.
>
>
> sym ase-mass vasp-mass delta
> X 0.000000None None
> H 1.007940 1.0 0.00794
> He 4.002600 4.0 0.0026
> Li 6.941000 7.01 -0.069
> Be 9.012180 9.013 -0.000819999999999
> B 10.811000 10.811 0.0
> C 12.011000 12.011 0.0
> N 14.006700 14.001 0.0057
> O 15.999400 16.0 -0.0006
> F 18.998400 18.998 0.000399999999999
> Ne 20.179700 20.18 -0.000299999999999
> Na 22.989770 22.99 -0.000229999999998
> Mg 24.305000 24.305 0.0
> Al 26.981540 26.982 -0.00046
> Si 28.085500 28.085 0.000499999999999
> P 30.973760 30.974 -0.000240000000002
> S 32.066000 32.066 0.0
> Cl 35.452700 35.453 -0.000300000000003
> Ar 39.948000 39.949 -0.000999999999998
> K 39.098300None None
> Ca 40.078000 40.078 0.0
> Sc 44.955900 44.956 -0.000100000000003
> Ti 47.880000 47.88 0.0
> V 50.941500 50.941 0.000499999999995
> Cr 51.996000 51.996 0.0
> Mn 54.938000 54.938 0.0
> Fe 55.847000 55.847 0.0
> Co 58.933200 58.933 0.0002
> Ni 58.693400 58.69 0.0034
> Cu 63.546000 63.546 0.0
> Zn 65.390000 65.39 0.0
> Ga 69.723000 69.723 0.0
> Ge 72.610000 72.61 0.0
> As 74.921600 74.922 -0.000399999999999
> Se 78.960000 78.96 0.0
> Br 79.904000 79.904 0.0
> Kr 83.800000 83.8 0.0
> Rb 85.467800None None
> Sr 87.620000 87.62 0.0
> Y 88.905900None None
> Zr 91.224000 91.224 0.0
> Nb 92.906400None None
> Mo 95.940000 95.94 0.0
> Tc nan 98.906 nan
> Ru 101.070000 101.07 0.0
> Rh 102.905500 102.906 -0.000500000000002
> Pd 106.420000 106.42 0.0
> Ag 107.868000 107.868 0.0
> Cd 112.410000 112.411 -0.001
> In 114.820000 114.82 0.0
> Sn 118.710000 118.71 0.0
> Sb 121.757000 121.75 0.00700000000001
> Te 127.600000 127.6 0.0
> I 126.904500 126.904 0.000500000000002
> Xe 131.290000 131.294 -0.00400000000002
> Cs 132.905400None None
> Ba 137.330000None None
> La 138.905500 138.9 0.00549999999998
> Ce 140.120000 140.115 0.005
> Pr 140.907700 140.907 0.000699999999995
> Nd 144.240000 144.24 0.0
> Pm nan 146.915 nan
> Sm 150.360000 150.36 0.0
> Eu 151.965000 151.965 0.0
> Gd 157.250000 157.25 0.0
> Tb 158.925300 158.925 0.000299999999982
> Dy 162.500000 162.5 0.0
> Ho 164.930300 164.93 0.000299999999982
> Er 167.260000 167.26 0.0
> Tm 168.934200 168.93 0.0042
> Yb 173.040000 173.04 0.0
> Lu 174.967000 174.967 0.0
> Hf 178.490000 178.49 0.0
> Ta 180.947900 180.948 -0.000100000000003
> W 183.850000 183.85 0.0
> Re 186.207000 186.207 0.0
> Os 190.200000 190.2 0.0
> Ir 192.220000 192.22 0.0
> Pt 195.080000 195.08 0.0
> Au 196.966500 196.966 0.000499999999988
> Hg 200.590000 200.59 0.0
> Tl 204.383000 204.38 0.00300000000001
> Pb 207.200000 207.2 0.0
> Bi 208.980400 208.98 0.000400000000013
> Po nan 208.942 nan
> At nan 209.987 nan
> Rn nan 22.017 nan
> Fr nanNone None
> Ra 226.025400None None
> Ac nan 227.028 nan
> Th 232.038100 232.039 -0.000900000000001
> Pa 231.035900 231.036 -0.000100000000003
> U 238.029000 238.029 0.0
> Np 237.048200 237.048 0.000200000000007
> Pu nan 244.064 nan
> Am nan 243.061 nan
> Cm nanNone None
> Bk nanNone None
> Cf nanNone None
> Es nanNone None
> Fm nanNone None
> Md nanNone None
> No nanNone None
> Lr nanNone None
> John
>
> -----------------------------------
> John Kitchin
> Associate Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>
>
>
>
> On Tue, Apr 2, 2013 at 12:33 PM, Gaël Donval <gael.donval at cnrs-imn.fr>
> wrote:
> Dear all,
>
> I'm working on integrating VASP velocities in ASE.
>
> VASP always outputs velocities in A/fs (one can give
> velocities as
> base_vector/time_step but this is not the point here).
>
> I had problems recalculating the kinetic energy and the
> temperature from
> ASE using the appropriate functions:
> atoms.get_kinetic_energy() and
> atoms.get_temperature(). Here is what I did:
>
> 1) Convert units to SI (I'm more comfortable with them):
> mass_si = mass * ase.units._amu # Da to kg
> v_si = v_vasp * 1e5 # A/fs to m/s
>
> 2) Calculate the kinetic energy in eV:
> ((mass_si*(v_si**2).sum(axis=1)/2.)*units.J).sum() #
> in eV
>
> 3) Calculate the temperature in Kelvins:
> (2*ekin/(3*len(atoms)))/units.kB
>
> I could compare 2) and 3) with the results given in VASP.
> Basically, I
> get almost the same values, but not exactly (VASP: 5.326 eV,
> Calculations: 5.313 eV). I'm curious to get your opinion about
> this
> difference. I know the mass and the velocity with at least 6
> significative figures ... I acknowledge that these results are
> close
> from each other but I expect at the very least 4 identical
> figures here.
> Maybe the masses...
>
>
> This is not all. When I use ase and put the velocities in as
> m/s, just
> like above, the calculated energies and temperatures are
> completely off
> (by a factor of 100, Ek=0.05434 u. --this is not even
> 0.05313...).
>
> I guessed this was because of units. I can't change masses,
> but only
> velocities. Since I have a factor of around 100, I just had to
> multiply
> my velocities by 10. The problem is that I don't see how that
> would make
> sensible units. Would anyone more familiar with atomic sets of
> units be
> willing to shed light on this?
>
> Thanks in advance,
> Gael
>
>
> _______________________________________________
> ase-developers mailing list
> ase-developers at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-developers
>
More information about the ase-users
mailing list