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.
https://maserasgroup-repo.github.io/pyssian/
MIT License
17 stars 0 forks source link

Change parsing behaviour to a lazy parsing #9

Open rperezsoto opened 3 years ago

rperezsoto commented 3 years ago

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.

rperezsoto commented 3 years ago

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.