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

Documenting default parameter values? #19

Closed
corinwagen opened this issue Aug 1, 2023 · 4 comments
Closed

Documenting default parameter values? #19

corinwagen opened this issue Aug 1, 2023 · 4 comments

Comments

@corinwagen
Copy link
Contributor

Hi Kjell, this is really great work—very easy to use!

It would be nice if the default values for various parameters were documented somewhere: it seems like they're set here, but I'm not sure if those can be overridden by default arguments in other places (I don't think I have a great understanding of how DLFIND works underneath the hood, etc).

It seems like this is a lot of work, but maybe just for important parameters like iopt, inithessian, update, etc?

Anyhow, I appreciate this a lot.

@kjelljorner
Copy link
Collaborator

Hello @corinwagen! Nice that you like it! I intentionally made it a very thin wrapper that only exposes the parameters that you get to set through the normal Fortran interface. The best source that I have to the meaning of the parameters is the manual, as well as the comments in the global module and I didn't explore all the options myself. I unfortunately don't have any time or intention to document this further at the moment. My idea was to keep it as close to DL-FIND and possible and refer to their (sparse) documentation.

The file that you are referencing is actually not used when you run DL-FIND, it is rather a test suite that can be used to check whether the program works as intended once you compile it. See this section in the manual:

However, for testing purposes, a driver module (main.f90) providing some analytic energy functions is used.

The parameters are set using a function dlf_get_params that needs to be supplied externally to DL-FIND. In libdlfind, that function is here:

def make_dlf_get_params( # noqa: C901

I think the defaults are set in this subroutine:

subroutine dlf_read_in(nvarin,nvarin2,nspec,master)

Which additionally calls two other subroutines:

end subroutine dlf_default_init

subroutine dlf_default_set(nvarin)

Pull request are of course always welcome 😉

@corinwagen
Copy link
Contributor Author

Haha, point taken! Thanks for pointing me in the right direction; I'll see if I find the time in the next few weeks to document the most common options.

@kjelljorner
Copy link
Collaborator

No pressure 😄 Maybe you can also find some clues in the ChemShell implementation of their DL-FIND Python implementation:
https://chemshell.org/static_files/py-chemshell/manual/build/html/opt.html (you need to sign up to download their code, which is also very much hard-wired to work with PyChemShell)

@kjelljorner
Copy link
Collaborator

Closed by #20

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

No branches or pull requests

2 participants