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

Add some metadata to integrators and export coefficients #679

Closed
reubenharry opened this issue May 15, 2024 · 3 comments
Closed

Add some metadata to integrators and export coefficients #679

reubenharry opened this issue May 15, 2024 · 3 comments

Comments

@reubenharry
Copy link
Contributor

Current behavior

There's no way to currently obtain the number of gradient calls for a given integrator.

Also, it is sometimes useful to have the integrator coefficients, and these aren't exported from integrators.py.

Desired behavior

Functions like:

def calls_per_integrator_step(c):
    if c==velocity_verlet_coefficients: return 1
    if c==mclachlan_coefficients: return 2
    if c==yoshida_coefficients: return 3

    else: raise Exception

def name_integrator(c):
    if c==velocity_verlet_coefficients: return "velocity_verlet"
    if c==mclachlan_coefficients: return "mclachlan"
    if c==yoshida_coefficients: return "yoshida"

    else: raise Exception

Also, to export the coefficients.

@junpenglao
Copy link
Member

Per #681, we need some other ways to expose this information.

How about assigning the property to the return integrator object? We can type integrators as Protocal.

@reubenharry
Copy link
Contributor Author

Yes, I think that would be good. The info we want attached is:

  1. Order of the integrator
  2. Number of grad calls
  3. Name
  4. Type (isokinetic or mclachlan)
  5. The integrator itself (this could be a function of "isokinetic" or "euclidean", if you think that's a reasonable design decision

@junpenglao
Copy link
Member

I think the decision ultimately tie to how these information is used in the library beyond benchmarking. Let's circle back when you have some examples.

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