Skip to content

Bug with low-level interface and generate_interface macro #26

Description

@mfherbst

I am in the process of updating ASEconvert to v0.2 (mfherbst/ASEconvert.jl#21)

This works:

import AtomsCalculators: @generate_interface

@generate_interface function AtomsCalculators.calculate(::AtomsCalculators.Energy,
        system, calc::ASEcalculator, parameters=nothing, state=nothing; kwargs...)
    # ...
end

but this does not

import AtomsCalculators: @generate_interface, calculate, Energy, Forces, Virial

@generate_interface function calculate(::Energy,
        system, calc::ASEcalculator, parameters=nothing, state=nothing; kwargs...)
    # ...
end

and (related to #23) gives the rather cryptic error message

Possible typo (or other issue) in function definition. Could not determine the type of calculation (energy, forces or virial...).

from which it took me a while to find out what I had to change to the function definition to make the macro work.

@tjjarvinen Could you take a look?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions