qcscine / sparrow

https://scine.ethz.ch
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

The thermochemistry results does not appear in python #22

Closed totocotonio1 closed 1 year ago

totocotonio1 commented 1 year ago

Hello

`calculator.set_required_properties([su.Property.Energy, su.Property.Gradients, su.Property.AtomicHessians, su.Property.Thermochemistry, su.Property.Hessian])

print(results.thermochemistry)`

I got all the results except thermochemistry results

scine_utilities.ThermochemicalComponentsContainer object at 0x7a14b9d2e730

weymutht commented 1 year ago

Thanks a lot for giving Sparrow a try!

The thermochemistry results are stored in a so-called ThermochemicalComponentsContainer object. You need special functions to get the actual data. For example, to get the overall Gibbs free energy, you would use

results.thermochemistry.overall.gibbs_free_energy

To get only the vibrational contribution to the entropy, you would use

results.thermochemistry.vibrational_component.entropy

You can use the Python function dir() to quickly check what functions an object supports:

print(dir(results.thermochemistry))
print(dir(results.thermochemistry.overall))
totocotonio1 commented 1 year ago

Dear colleague,

Thank you very much for your prompt reply, it was helpful,

It will be perfect to update the Sparrow user manual specifically about functions among the Python binding

Thank you again for this wonderful package,

regards