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

Real-space cutoffs #9

Merged
merged 6 commits into from
Jan 4, 2023
Merged

Real-space cutoffs #9

merged 6 commits into from
Jan 4, 2023

Conversation

marvinfriede
Copy link
Member

Real-space cutoffs for the coordination number and the dispersion energy are implemented to (finally) achieve full consistency with the total dispersion energy of the Fortran implementation.

Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

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

Let's provide all cutoff values in the constructor rather than having to construct an incomplete object and adding the attributes with setters.

Also, no C-style casting in C++.

@marvinfriede
Copy link
Member Author

Let's provide all cutoff values in the constructor rather than having to construct an incomplete object and adding the attributes with setters.

I don't understand that part. The constructor writes the default values to all members here. The setters are just for changing it (required within a test).

Also, no C-style casting in C++.

So just multiplying by 1.0?

@awvwgk
Copy link
Member

awvwgk commented Dec 12, 2022

I don't understand that part. The constructor writes the default values to all members here. The setters are just for changing it (required within a test).

Why not have the tests recreate the object with the correct values in the constructor then? Or directly setting the value of the members as they are public.

So just multiplying by 1.0?

https://en.cppreference.com/w/cpp/language/static_cast

@marvinfriede
Copy link
Member Author

I don't understand that part. The constructor writes the default values to all members here. The setters are just for changing it (required within a test).

Why not have the tests recreate the object with the correct values in the constructor then? Or directly setting the value of the members as they are public.

Oh. I forgot about the members being public...

src/dftd_cutoff.cpp Outdated Show resolved Hide resolved
@marvinfriede
Copy link
Member Author

Can I merge this?

@marvinfriede marvinfriede merged commit 7d57b00 into dftd4:main Jan 4, 2023
@marvinfriede marvinfriede deleted the cutoff branch January 4, 2023 08:51
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.

2 participants