NeighborList error

90 views
Skip to first unread message

Hasan Babaei

unread,
Nov 25, 2018, 3:14:58 PM11/25/18
to aenet
Dear Nong,

When I run MD or relaxation with ASE I get the following error:

"File "..../lib/python3.6/site-packages/aenet-0.1.0a1-py3.6-linux-x86_64.egg/aenet/ase_calculator.py", line 55, in update
    len(self.neighbors.cutoffs) != len(atoms)):
AttributeError: 'NeighborList' object has no attribute 'cutoffs'"

I can fix the error by editing the source code (ase_calculator.py) and removing the second condition in the if (len(self.neighbors.cutoffs) != len(atoms)).

But I think this should not be the correct way and it does not update the neighbor list of atoms. The atoms get very close to each other.

I will appreciate it if you would help with this.

I am also wondering if cell relaxation and stress calculation have been added to the recent versions. If not, can you estimate how much work required to add stress calculations to the source code? I may have to do this.

Thanks,
Hasan

Nongnuch Artrith

unread,
Nov 25, 2018, 3:29:44 PM11/25/18
to Hasan Babaei, ae...@googlegroups.com
Dear Hasan,

Regarding your first question: You are the first person to report such a neighbor list error, so I am wondering if it could be caused by your specific structure model.  For example, if you run an MD simulation with a potential that is not yet robust enough, it could result in very unphysical structures for which the neighbor list might not work.  Our neighbor list implementation can also run into problems if the simulation cell has very pointy angles.

Regarding your second question, unfortunately we have not yet gotten around implementing stress calculations.  There is a patch for aenet version 1, but it will require some effort to make it work with the current version.  If somebody sends us a pull request with a working implementation on GitHub, I will make sure that it gets integrated.

All the best,
Nong

Nongnuch Artrith

unread,
Nov 25, 2018, 4:33:26 PM11/25/18
to Hasan Babaei, ae...@googlegroups.com
Dear Hasan,

I found that the new ASE version uses a slightly different syntax from the version that we originally used.  Can you please try to change "self.neighbors.cutoffs" to "self.neighbors.nl.cutoffs" and report if this fixes the problem?

This line ensures that a neighbor list has been set up and is updated.

Best,
Nong

On Sun, Nov 25, 2018 at 8:42 PM hasan babaei <hnba...@gmail.com> wrote:
Thanks for your quick response.
The error occurs on the first step. When I remove the second condition (len(self.neighbors.cutoffs) != len(atoms)) it works. Could you let me know what this condition does and whether having this is necessary?

I have been using the potential for other calculations. I think it should be robust.

Hasan

Hasan Babaei

unread,
Nov 25, 2018, 4:36:43 PM11/25/18
to aenet
Yes, it fixed the problem.
Thanks so much.
Hasan
Reply all
Reply to author
Forward
0 new messages