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

Support for sisl types #51

Open
pfebrer opened this issue Jun 7, 2020 · 1 comment
Open

Support for sisl types #51

pfebrer opened this issue Jun 7, 2020 · 1 comment

Comments

@pfebrer
Copy link
Collaborator

pfebrer commented Jun 7, 2020

Hi! Do you think it makes sense to have support for sisl types in the SiestaBaseWorkchain?

Using a very simple serializer for the inputs:

def sisl_serializer(sisl_obj):
    '''
    Function that converts sisl objects to aiida types.
    '''
    try:
        import sisl
    except ModuleNotFoundError:
        return

    if isinstance(sisl_obj, sisl.Geometry):
        return StructureData(ase=sisl_obj.toASE())
    elif isinstance(sisl_obj, sisl.MonkhorstPack):
        kpoints = KpointsData()
        kpoints.set_kpoints_mesh(sisl_obj._diag, sisl_obj._displ)
        return kpoints

then you could directly pass geometries from sisl as inputs for an aiida workflow, which I believe it's interesting because sisl can read structures from *fdf, *XV, etc... and this would probably reduce the friction between siesta users and aiida.

Or maybe it's not worth it because the user may be creating multiple nodes with the same structure without knowing it?

@zerothi
Copy link
Member

zerothi commented Oct 4, 2022

This should be much easier with a coming change. Sisl will enable one to parse buffers as files. See zerothi/sisl#484

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