Skip to content
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

Fixed bug that gives pressure=NaN when a species has phi=0 #19

Merged
merged 1 commit into from
May 4, 2022

Conversation

benmagruder
Copy link
Contributor

When a solvent or polymer is included in the param file but has phi=0, the calculated pressure of the system is erroneously reported as NaN because the software is calculating 0*(-inf) as the contribution of the nonexistent species to the pressure. This pull request will fix this bug for fd1d, pspc, and pspg by only calculating the free energy contributions of species for which phi>1E-08. I ran a quick test and it compiles and runs correctly.

This is the same bug that was addressed by my recent pull request in pscfpp, except in the Fortran code it is only the pressure that was reported as NaN, the free energy was being calculated correctly.

@dmorse dmorse merged commit c01e82f into dmorse:bugfix May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants