load input files from subfolder

11 views
Skip to first unread message

Xenhua Zhang

unread,
Jun 10, 2019, 9:38:39 AM6/10/19
to tam...@googlegroups.com
Dear Toon,

I am loading the vasp files CONTCAR and OUTCAR from the sub-folders as you can see from the attached script.

I am getting an error:

Traceback (most recent call last):
  File "script_kinetics.py", line 30, in <module>
    tm = ThermodynamicModel(pf_IS, pf_FS)
  File "/home/xenhua/anaconda3/envs/py27/lib/python2.7/site-packages/tamkin/chemmod.py", line 315, in __init__
    self._add_pfs(pfs_react, -1)
  File "/home/xenhua/anaconda3/envs/py27/lib/python2.7/site-packages/tamkin/chemmod.py", line 77, in _add_pfs
    for pf in pfs:
TypeError: 'PartFun' object is not iterable

Could you please point me to where I am making a mistake in this script. Thank you so much.

Best regards
Xenhua


script_kinetics.py

Toon Verstraelen

unread,
Jun 11, 2019, 3:41:08 AM6/11/19
to tam...@googlegroups.com
Dear Xenhau,

Could you try changing the following line:

tm = ThermodynamicModel(pf_IS, pf_FS)

into 

tm = ThermodynamicModel([pf_IS], pf_FS)

?

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.
To post to this group, send email to tam...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tamkin/CADzbQDB5TSmAR5cxdE59ZGdW5iShkk3_j4g0xeXXQE7huWYC%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Prof. Dr. ir. Toon Verstraelen
Center for Molecular Modeling
Technologiepark-Zwijnaarde 46 (before Jan 1, 2019, this was building 903)
Ghent University
Tech Lane Ghent Science Park Campus A
9052 Zwijnaarde
Belgium
E-mail: Toon.Ver...@UGent.be


Xenhua Zhang

unread,
Jun 11, 2019, 5:02:35 AM6/11/19
to tam...@googlegroups.com
Dear Toon,

I would like to inform you that I have made the script (attached) to work successfully for me. Thank you for your tips.

However, I would like to point out to you that the thermodynamic model line only worked when both the [pf_IS] and [pf_FS] are enclosed in square brackets. (are made into lists?)
It gets more complicated when the kinetic model method is introduced in the script. "km = KineticModel([pf_IS], [pf_TS])" does not work with both pfs included in square brackets. They don't work even when both are not in square brackets, "km = KineticModel(pf_IS, pf_TS)". It works only in the case when initial state pf is in square brackets and the pf of transition state isn't, "km = KineticModel([pf_IS], pf_TS)"

It will be much better to have similar syntax for both Thermodynamic and  Kinetic Model methods.

Best regards,
Xenhua

script_kinetics.py

Toon Verstraelen

unread,
Jun 11, 2019, 7:49:10 AM6/11/19
to tam...@googlegroups.com
Hi Xenhua,

I was indeed mixing up the two. This API is currently defined this way because (as far as I know), there is no case where multiple partition functions for a transition state would make sense. If you know exceptions, please let me know.

Best regards,

Toon


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages