Skip to content

New fields for Gaussian parser #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from
Closed

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Aug 1, 2016

I needed additional fields not present in the original parser so I went ahead and extended the .extract() method. I had to also extend the ccData class with the new attributes:

  • stoichiometry: str,
  • thermalenergies: float,
  • zeropointenergies: float
  • imaginaryfreqs: int
  • alphaelectrons: int
  • betaelectrons: int

It also fixes a typo in the free energy parsing line (it was missing an e: freenergy instead of freeenergy).

I hope you find it useful!

@jaimergp
Copy link
Contributor Author

jaimergp commented Aug 1, 2016

Quick question: do these energies need unit conversion like those in scfenergies?

@langner
Copy link
Member

langner commented Aug 1, 2016

We generally prefer not to parse something if it can be calculated. For example, stoichiometry can be built from the list of atomic numbers, right?

@jaimergp
Copy link
Contributor Author

jaimergp commented Aug 1, 2016

Fair enough. Let me know which ones you want to keep!

@langner
Copy link
Member

langner commented Aug 1, 2016

Well, let's look at them one at a time. I think stoichiometry is easy to calculate - I sent jaimergp#1 for you to incorporate. Can you check if it works for you? We could also make it a method on the ccData class if that would be more convenient.

@langner
Copy link
Member

langner commented Aug 1, 2016

Quick question: do these energies need unit conversion like those in scfenergies?

Yes, it would be best to be consistent and present all energies in the same units. We would like to be able to switch in the future (#89).

@langner
Copy link
Member

langner commented Aug 2, 2016

Added the charge to the formula in jaimergp#2. Anything else that needs to be done for the stoichiometry?

@langner langner added this to the v1.5 milestone Aug 3, 2016
@langner
Copy link
Member

langner commented Aug 5, 2016

It seems you added carriage returns to data.py in 3a9e4dd, marking the whole file as changed. Could you please rewrite this commit so that this doesn't happen?

if line[1:12] == "Temperature":
self.set_attribute('temperature', float(line.split()[1]))
if "Sum of electronic and zero-point Energies=" in line:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For zero point energy we should probably subtract the electronic energy. @berquist any comments on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be subtracted out. Though, why not use the line with Zero-point correction=?

@ATenderholt
Copy link
Contributor

It looks like we were primarily waiting on fixes to the line endings for data.py. You should also take care of the current conflicts.

@jaimergp
Copy link
Contributor Author

jaimergp commented Nov 27, 2017

Well, I have invested more time than I will admit with git rebase trying to fix the line endings mess, but I cannot get it. There's a conflict between the lines changed on commit c19201a (you can see the trailing ^M there), and then when the PR is merged, the mess begins. To me, it seems that commit 3a9e4dd tried to unify the line-endings, but the damage was done by that time. I am seriously considering starting all over again with proper line-endings in a new PR...

[Edit] Maybe now it's working? There's some duplication of commits, but apparently it's all good... See below.

@jaimergp
Copy link
Contributor Author

jaimergp commented Feb 2, 2018

I am tempted to start all over with this PR and forget about the commit mess... @langner authored the stoichiometry part, but I can (re)submit the changes having to do with:

  • thermalenergies
  • zeropointenergies
  • alphaelectrons
  • betaelectrons

Is that OK?

@langner
Copy link
Member

langner commented Feb 5, 2018

Well... it seems something's wrong with the current set of changes (only alphaelectrons shows up in the parser code now).

If you want to split the PR up into smaller bits, a reasonable way to do it is to have one attribute per PR.

@langner langner modified the milestones: v1.5.3, v1.5.4 Apr 4, 2018
@langner
Copy link
Member

langner commented Apr 17, 2018

This PR is getting unmanageable. @jaimergp if you still plan on pushing this forward, some changes are needed due to recent refactors. And, please break up into smaller PRs, which will be easier to merge in.

@jaimergp
Copy link
Contributor Author

Yes, @langner, I will get back to this as soon as I can. For the time being, we can close this PR and I will create new separate PRs as needed. By the way, which refactors should I look into?

@jaimergp
Copy link
Contributor Author

jaimergp commented Aug 1, 2018

Ok, I am ready to get back to this. Before opening a new PR and forgetting about this, I'd like to sum up the pending tasks:

  • Be careful with line endings, trailing whitespace and so on.
  • Thermochemistry. Do we really want more ccData attributes for Sum of electronic and zero-point Energies and Sum of electronic and thermal Energies? If so, which names should we use? zeropointenergies and thermalenergies? (Plural or singular?)
  • Alpha and beta electrons. I think someone mentioned that it can be computed out of another field already? homos?
  • Stoichiometry. @langner implemented that and I wouldn't like to take credit for that. The code is described here.

Depending on the answers, I will start independent PRs for each point, if that's OK.

@berquist
Copy link
Member

berquist commented Aug 1, 2018

Thermochemistry. Do we really want more ccData attributes for Sum of electronic and zero-point Energies and Sum of electronic and thermal Energies? If so, which names should we use? zeropointenergies and thermalenergies? (Plural or singular?)

I have notes somewhere on this, but maybe you can tell me: can we calculate those numbers, or are they unique fields? If they're unique, I think we should let the user/external program calculate them, and mention this in the Gaussian section of the documentation. We should avoid redundant/non-unique attributes if possible.

For singular/plural, right now all our thermochemistry attributes are singular, because only single values get parsed, and we assume there's only one thermochemistry block per calculation. This will change in the future, because many programs can do multiple isotope runs for a single frequency calculation.

Alpha and beta electrons. I think someone mentioned that it can be computed out of another field already? homos?

Yes. Generally,

if len(homos) == 1:
    nalpha = nbeta = homos[0] + 1
else:
    nalpha = homos[0] + 1
    nbeta = homos[1] + 1

Stoichiometry. @langner implemented that and I wouldn't like to take credit for that. The code is described here.

You can make a new PR from exactly those commits and all the metadata, like authorship, will be correctly retained.


Yes, you should make new PRs. You can use git cherry-pick <id1> <id2> ... in a new branch to get the commits you want out of this PR.

@langner
Copy link
Member

langner commented Aug 6, 2018

SGTM. Rebasing in this PR is OK with me as well, but new ones would be cleaner. Please just reference this one from the new ones to keep the history of communication.

@berquist
Copy link
Member

berquist commented Aug 6, 2018 via email

@jaimergp
Copy link
Contributor Author

Ok, got it. In the following days I will be posting the new PRs.

@langner
Copy link
Member

langner commented Aug 26, 2018

@jaimergp Do you think you will have time in the next week to finish this up before the release?

@jaimergp
Copy link
Contributor Author

Hi @langner! I have doubts on what I am supposed to do :/

After reading @berquist's answer to point 2, I think we should start a conversation about what to do with the thermochemistry. Maybe creating an issue for this is enough for now?

So, the only thing left is to calculate the number of alpha and beta electrons with, I guess, the same approach we did for stoichiometry: have a method somewhere and then call it with a property from ccData? If this is the only thing I have to do, yes, it can be done during this week.

@berquist
Copy link
Member

I think we should start a conversation about what to do with the thermochemistry. Maybe creating an issue for this is enough for now?

Sounds exactly right. I'm not comfortable adding attributes for those fields until I can remember how they map to fields in other programs, but I haven't gotten around to it.

have a method somewhere and then call it with a property from ccData? If this is the only thing I have to do, yes, it can be done during this week.

Maybe inside method.electrons.Electrons?

@langner
Copy link
Member

langner commented Aug 26, 2018

OK... pushing this back for after the release.

@langner langner modified the milestones: v1.5.4, v1.5.5 Aug 26, 2018
@jaimergp
Copy link
Contributor Author

jaimergp commented Sep 3, 2018

Since, the relevant PRs have been submitted and I have just create the issue to discuss thermochemistry, I'd say we can dismiss this PR and close it.

@berquist berquist closed this Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants