CCL: Use cclib functionality as part of Python script?



Hi Francisco,

Here's one way to do it:

import cclib
logfile = cclib.parser.ccopen('filename.out')
data = "">
print data.ccenergies


On Thu, Feb 22, 2018 at 2:21 PM, Guzman, Francisco fg58_-_njit.edu <owner-chemistry^^ccl.net> wrote:
Hello CCL'ers

Does anyone have experience using/importing parts cclib as part of a Python script?

I want to be able to extract the CCSD(T) energies, convert from eV to Hartrees, and use plug these energies into an equation extrapolation to the CBS limit. This is straight forward enough to do in bash, but I can't extract these energies the same way I would using a terminal using a Python script.

Using a terminal, I can extract the energies executing:
ccget ccenergies filname.out

However, I want to be able to store this ouput as a new variable as part of a larger Python script I am making for my own post processing.

I've tried to "import cclib" in my script, but I don't know how to repeat the output of "ccget ccenergies" as I would using a terminal.

Thanks,

/python novice

--
Francisco Guzman
PhD Candidate
Otto H. York Department of Chemical, Biological and Pharmaceutical Engineering
New Jersey Institute of Technology