Skip to content

Not orthorhombic unit cell #36

@hlscalon

Description

@hlscalon

I am porting some code from python (mostly using ASE) to this library, and it's been great.

But I am stuck in a problem I cant seem to resolve.
When working with a FCC lattice with ASE, using a 3x3 vector like:

[ [5.1053 0.0 0.0] [0.0 8.8426 0.0] [0.0 0.0 12.5054] ]

I can port it to Aboria searching functions using min, max like:

vdouble3 min = vdouble3(0.0, 0.0, 0.0);
vdouble3 max = vdouble3(5.1053, 8.8426, 12.5054);
vbool3 periodic = vbool3(true, true, false);

particles.init_neighbour_search(min, max, periodic);

And it works great, result is the same as in ASE (using functions like get_distances, etc.)

But, when working with a HCP lattice (ie. 90º 90º 120º), like:

[ [8.8500 0.0 0.0] [-4.4249 7.6643 0.0] [0.0 0.0 9.3692] ]

Making stuff like:

vdouble3 min = vdouble3(-4.4249, 0.0, 0.0);
vdouble3 max = vdouble3(8.8500, 7.6643, 9.3692);

or

vdouble3 min = vdouble3(-4.4249, 0.0, 0.0);
vdouble3 max = vdouble3(8.8500, 8.8500, 9.3692);

I can't get the same result as in python.
Is it possible to use such unit cells (ie. not 90º 90º 90º) in Aboria ?

I am sorry if I am missing something trivial, not my area

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions