how to calculate thermodynamic parameters using VASP frequency calculation

427 views
Skip to first unread message

yayun zhang

unread,
Jun 15, 2016, 12:10:15 AM6/15/16
to TAMkin, Toon.Ver...@ugent.be
Hi, do you guys know how to use TAMkin to calculate thermodynamic parameters using frequency output calculated by VASP? I will so appreciated if some of you can give a favor. According to the tutoral from TAMkin, some files are set up to have a test, but it failed as said:
Traceback (most recent call last):
  File "./thermo.py", line 41, in <module>
    molecule = load_molecule_vasp("contcar.xyz","outcar_freq","outcar_energy")
  File "/home/zyy/.local/lib/python2.7/site-packages/tamkin/io/vasp.py", line 91, in load_molecule_vasp
    rvec_scale = float(f.next())
ValueError: could not convert string to float: Comment

input files are attached, Thank you so much in advance.
contcar.xyz
outcar_energy
outcar_freq
thermo.py

Toon Verstraelen

unread,
Jun 15, 2016, 12:41:39 AM6/15/16
to tam...@googlegroups.com
Hi Yayun,

Assuming, you're using the latest version (1.0.9), this is what you should have on
line 41:

molecule = load_molecule_vasp("contcar", "outcar_freq")

There have been some changes in the VASP reader recently. The documentation of
that function can be found here:

https://github.com/molmod/tamkin/blob/master/tamkin/io/vasp.py#L49

Cheers,

Toon

P.S. Usually VASP writes out filenames in capitals, so it could actually be:

molecule = load_molecule_vasp("CONTCAR", "OUTCAR_FREQ")
> --
> You received this message because you are subscribed to the Google Groups "TAMkin"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> tamkin+un...@googlegroups.com <mailto:tamkin+un...@googlegroups.com>.
> To post to this group, send email to tam...@googlegroups.com
> <mailto:tam...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tamkin/1e98f5ac-a3e0-4be3-be28-ca2736db4271%40googlegroups.com
> <https://groups.google.com/d/msgid/tamkin/1e98f5ac-a3e0-4be3-be28-ca2736db4271%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Prof. Dr. ir. Toon Verstraelen
Center for Molecular Modeling
Ghent University
Technologiepark 903,
B9052 Zwijnaarde
Belgium
Tel: +32 9 264 65 56
GSM: +32 471 66 68 83
E-mail: Toon.Ver...@UGent.be
http://molmod.UGent.be/
http://molmod.UGent.be/software/

yayun zhang

unread,
Jun 16, 2016, 1:13:40 PM6/16/16
to TAMkin
Dear Toon,
     Following with your suggest I have successfully run the test. and now I am going to calculate my work, but again was confused about some problems. In the paper it says "The Gibbs free energy (G) of gas phase species was estimated by taking into account translational, rotational and vibrationa contributions to the partition function. Weakly adsorbed species (CH4, CO2, H2O and H2) were modeled as 2 dimensional gases and it was assumed that they maintain full rotational and
vibrational modes of the respective gas phase species. For the remaining (strongly) adsorbed species, i.e. all other adsorbed species and transition states, only the vibrational contributions were computed. Thermal effects on the metallic atoms were not considered"--Intrinsic reactivity of Ni, Pd and Pt surfaces in dry reforming and competitive reactions_ Insights from first principles calculations and microkinetic modeling simulations.

According to the method mentioned above, how can I define the xxx.py?  I write the following script but donn't know wether it is right or not
# Import the tamkin libarary.
from tamkin import *
# Load the gaussian data.
fixed = [0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]
mobile = [36,37,38,39,40,41,42]
mol_both = load_molecule_vasp("CONTCAR","OUTCAR_FREQ")
# Perform the normal mode analysis
nma_both = NMA(mol_both,PHVA(fixed))
# Construct a partition function object with the typical gas phase contributions.
pf = PartFun(nma_both,[ExtTrans(cp=True,dim=2,mobile=mobile)])
# Write some general information about the molecule and the partition function
# to a file.
pf.write_to_file("partfun.txt")
# Write an extensive overview of the thermodynamic properties to a file:
ta = ThermoAnalysis(pf, [300,400,500,600])
ta.write_to_file("thermo.csv")

my question is that whether the "dim= " controls the calculation. eg. ... Weakly adsorbed species (CH4, CO2, H2O and H2) were modeled as 2 dimensional gases..
as for this case, the dim=2, while  as for 'all other adsorbed species and transition states, only the vibrational contributions were computed.' The dim should be 1 in this situation.

Toon Verstraelen

unread,
Jun 28, 2016, 4:57:21 AM6/28/16
to tam...@googlegroups.com
Dear Yayung,

Sorry for the late reply.

Which paper are you referring to?

The dim=2 option does indeed give you a translational partition function of a 2D
ideal gas. Just keep in mind that your code does not include rotational degrees of
freedom in the partition function.

For non-mobile species, a 2D gas may not be suitable. That depends on the
approximations you want to make. If you want to include only the vibrational part,
just leave out the ExtTrans term, i.e. provide an empty list as follows:

pf = PartFun(nma_both,[])

Best Regards,

Toon

On 06/16/2016 07:13 PM, yayun zhang wrote:
> Dear Toon,
> Following with your suggest I have successfully run the test. and now I am
> going to calculate my work, but again was confused about some problems. In the
> paper it says "The Gibbs free energy (G) of gas phase species was estimated by
> taking into account translational, rotational and vibrationa contributions to the
> partition function. Weakly adsorbed species (CH4, CO2, H2O and H2) were modeled
> as2 dimensional gases and it was assumed that they maintain full rotational and
> --
> You received this message because you are subscribed to the Google Groups "TAMkin"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> tamkin+un...@googlegroups.com <mailto:tamkin+un...@googlegroups.com>.
> To post to this group, send email to tam...@googlegroups.com
> <mailto:tam...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tamkin/e6db634f-c372-48f4-9256-ad455c34dbcf%40googlegroups.com
> <https://groups.google.com/d/msgid/tamkin/e6db634f-c372-48f4-9256-ad455c34dbcf%40googlegroups.com?utm_medium=email&utm_source=footer>.

yayun zhang

unread,
Jul 4, 2016, 10:07:16 PM7/4/16
to TAMkin
Dear Toon,
     Thank you so much for your kind reply, the paper I mentioned last time is "Intrinsic reactivity of Ni, Pd and Pt surfaces in dry reforming and competitive reactions: Insights from first principles calculations and microkinetic modeling simulations".   Now I am confused about calculating the frequency of species binding to the surface.  theoretically, when I frozen all the surface atomes, the calculated frequency should not contain the contribution from these surface atoms. but my results actually included the surface atoms. 
 I want to know how could I just calcuate the frequency of gas species binded to the surface only, rather than including any surface atoms. I used following script:  fixed atoms are surface atoms that I dont want to calculate their frequencies.  mobile number are the gas species binded to the surface.

Toon Verstraelen

unread,
Jul 5, 2016, 12:49:52 AM7/5/16
to tam...@googlegroups.com
Dear Yayun,

At first sight, your script looks good. Can you send me the script and the VASP
files in tar.gz archive, so I can run it locally? That always makes it so much
easier to see what might be going wrong.

Best Regards,

Toon
> --
> You received this message because you are subscribed to the Google Groups "TAMkin"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> tamkin+un...@googlegroups.com <mailto:tamkin+un...@googlegroups.com>.
> To post to this group, send email to tam...@googlegroups.com
> <mailto:tam...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tamkin/32acb617-0465-40a0-8042-bdad22cc1a9f%40googlegroups.com
> <https://groups.google.com/d/msgid/tamkin/32acb617-0465-40a0-8042-bdad22cc1a9f%40googlegroups.com?utm_medium=email&utm_source=footer>.

yayun zhang

unread,
Jul 5, 2016, 10:11:17 AM7/5/16
to TAMkin
Dear Toon,
      The cases that the CO2 binding to the Ni surface and its gas phase are attached.  all files are included. Thank you.

Best,

yayun
Desktop.zip

Toon Verstraelen

unread,
Jul 6, 2016, 4:59:20 AM7/6/16
to tam...@googlegroups.com
Dear Yayun,

It looks good. These are the frequencies you get:

36.1 86.0 119.3 169.4 301.5 481.7 657.1 1105.7 1739.7

It is normal that you get 9 non-zero frequencies because the CO2 molecule is not
isolated in vacuum. It still feels the field due to the environment (metal
surface). Is this different from what you were expecting?

Best Regards,

Toon
> > tamkin+un...@googlegroups.com <javascript:>
> <mailto:tamkin+un...@googlegroups.com <javascript:>>.
> > To post to this group, send email to tam...@googlegroups.com <javascript:>
> > <mailto:tam...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/tamkin/32acb617-0465-40a0-8042-bdad22cc1a9f%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>
> --
> Prof. Dr. ir. Toon Verstraelen
> Center for Molecular Modeling
> Ghent University
> Technologiepark 903,
> B9052 Zwijnaarde
> Belgium
> Tel: +32 9 264 65 56
> GSM: +32 471 66 68 83
> E-mail: Toon.Ver...@UGent.be
> http://molmod.UGent.be/
> http://molmod.UGent.be/software/ <http://molmod.UGent.be/software/>
>
> --
> You received this message because you are subscribed to the Google Groups "TAMkin"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> tamkin+un...@googlegroups.com <mailto:tamkin+un...@googlegroups.com>.
> To post to this group, send email to tam...@googlegroups.com
> <mailto:tam...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tamkin/c35cc5e1-3002-42b1-80c5-692ac3efecf3%40googlegroups.com
> <https://groups.google.com/d/msgid/tamkin/c35cc5e1-3002-42b1-80c5-692ac3efecf3%40googlegroups.com?utm_medium=email&utm_source=footer>.

yayun zhang

unread,
Feb 9, 2017, 10:15:32 PM2/9/17
to TAMkin
Hello Toon,
     Can you tell me how to build the script of reaction.py for the vasp. I tried to write one script but runs incorrect. Here I attached the documents including vasp files for your reference. Can you help me to revise my reaction.py to get a successful run? Thank you so much.

Best,
yayun
vasp-reaction.7z

yayun zhang

unread,
Feb 14, 2017, 1:05:18 AM2/14/17
to TAMkin
Hello Toon,
     I have fixed the problem to get reaction rate from VASP results using TST. So you donn't need to reply to my last email. But I have another question about the reaction rate for the adsorption or desorption. Usually, people use collision theory to calculate rate constants for adsorption and desorption. Can Tamkin calculate the reaction rates for adsorption and desorption? If yes, how?  Thank you for your help.

Best,
yayun
Reply all
Reply to author
Forward
0 new messages