maserasgroup-repo / pyssian

Pyssian is an object oriented library for parsing Gaussian logfiles and input files which aims to facilitate the everyday scripting of computational chemists using Gaussian.

Home Page:https://maserasgroup-repo.github.io/pyssian/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change parsing behaviour to a lazy parsing

rperezsoto opened this issue · comments

Currently the parsing of each Link adds up the time needed to parse the final output file. Sometimes parsing LinkJobs that the user might not use at all (i.e. in a 502, generally the user is only interested in the last l502 however currently even when specifying the parselist, all Link502 are parsed.

One option is to overwrite the gettattr to call the appropiate locate function when its value is the default one the attr value is the initialization value.
Another option is to overwrite the getattr so that the first call to the getattr would trigger the parsing, probably using a private flag ( this should be easier to implement in the base class.