Check Generalization of unit cells in ASE

Issue #128 resolved
Alireza Khorshidi created an issue

Check to see if this is important for us in Amp?

https://listserv.fysik.dtu.dk/pipermail/ase-users/2016-November/003212.html

See also messages following it in the thread...

Comments (4)

  1. Alireza Khorshidi reporter

    This recent change in pbc of ASE seems to break the update (or build) method of NeighborList. If we do

    from ase import Atoms
    from ase.neighborlist import NeighborList
    
    image = Atoms('H', pbc=[True,])
    nl = NeighborList(cutoffs=[3.0,], self_interaction=False, bothways=True, skin=0.)
    nl.update(image)
    

    it will crash here with the message "IndexError: index 1 is out of bounds for axis 0 with size 1".

    I am not sure what they desire to do with this new implementation to go ahead and fix it. Therefore, I just put a comment under the merge request. Lets postpone this issue for now until we hear back from them.

  2. andrew_peterson repo owner

    I just saw your comment on ASE, but it looks like you put it on the closed merge request. I tried your test script with the newest master version of ASE and it breaks with a different error. You probably need to create an issue on the ASE gitlab page instead of on the merge request.

  3. Alireza Khorshidi reporter

    I was specifying the "pbc" keyword wrong as "[True,]"; see here. As Ask replied, apparently they have changed their mind and closed that merge request. Lets wait for more information from him and see how they have implemented the infinite dimension they had in mind.

  4. andrew_peterson repo owner

    I see. Actually it looks like you were specifying both the pbc and the cell wrong, because the new way of defining the unit cell is now defaulting to [0, 0, 0] if you don't otherwise specify. (Previously it was [1, 1, 1].) So a 0-sided cell with periodic boundary conditions should break with a divide by zero message when calculating neighborlists -- infinite neighbors!

    Anyway, I think this is behaving as we want if we write a script like

    from ase import Atoms
    from ase.neighborlist import NeighborList
    
    image = Atoms('H', pbc=True, cell=[1.5, 1.5, 1.5])
    nl = NeighborList(cutoffs=[3.0,], self_interaction=False, bothways=True, skin=0.)
    nl.update(image)
    

    so we can close this issue.

  5. Log in to comment