[ase-users] VASP+Hookean constraint

Peterson, Andrew andrew_peterson at brown.edu
Mon Jan 23 23:42:28 CET 2017


Looks like index_shuffle was not implemented correctly for the Hookean
constraint. I think I just fixed it in MR !405. However, I don't have Vasp,
so can't check your example. (Note this occurs because Vasp internally
re-arranges the atom order.) I added a test to make sure indices were
shuffling as I expect them too, but it would be nice if you are able to try
the branch in the merge request to make sure it works for you...

https://gitlab.com/ase/ase/merge_requests/405
https://gitlab.com/andrew_peterson/ase/commits/hookean-shuffle

On Mon, Jan 23, 2017 at 3:31 PM, Glen Jenness via ase-users <
ase-users at listserv.fysik.dtu.dk> wrote:

> Dear ASE Users,
> I am attempting to use the Hookean constraint with VASP (with the eventual
> goal of doing some minima hopping).
>
> However, I keep running into the following error:
>
> Traceback (most recent call last):
>   File "mwe.py", line 27, in <module>
>     opt.run(fmax=0.05)
>   File "/home/1482/programs/ase/ase/optimize/optimize.py", line 161, in
> run
>     self.set_force_consistent()
>   File "/home/1482/programs/ase/ase/optimize/optimize.py", line 214, in
> set_force_consistent
>     self.atoms.get_potential_energy(force_consistent=True)
>   File "/home/1482/programs/ase/ase/atoms.py", line 680, in
> get_potential_energy
>     self, force_consistent=force_consistent)
>   File "/home/1482/programs/ase/ase/calculators/vasp.py", line 834, in
> get_potential_energy
>     self.update(atoms)
>   File "/home/1482/programs/ase/ase/calculators/vasp.py", line 492, in
> update
>     self.calculate(atoms)
>   File "/home/1482/programs/ase/ase/calculators/vasp.py", line 684, in
> calculate
>     self.initialize(atoms)
>   File "/home/1482/programs/ase/ase/calculators/vasp.py", line 592, in
> initialize
>     self.atoms_sorted = atoms[self.sort]
>   File "/home/1482/programs/ase/ase/atoms.py", line 949, in __getitem__
>     con.index_shuffle(self, i)
>   File "/home/1482/programs/ase/ase/constraints.py", line 946, in
> index_shuffle
>     self.indices = [ind.index(self.indices[0]),
> AttributeError: 'numpy.ndarray' object has no attribute 'index'
>
> Can anyone provide any insight into this?
>
> Attached is a MWE that demonstrates the problem.
>
>
> Thanks!
> Dr. Glen Jenness
> Catalysis Center for Energy Innovation (CCEI)
> University of Delaware
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>



-- 
Andrew Peterson
Assistant Professor
Brown University School of Engineering
Barus & Holley 247
184 Hope Street
Providence, RI 02912
(401) 863-2153
http://brown.edu/go/catalyst
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170123/8a14e0e0/attachment.html>


More information about the ase-users mailing list