[ase-users] PreconLBFGS and broken symmetry

Jens Jørgen Mortensen jensj at fysik.dtu.dk
Wed May 24 12:05:47 CEST 2017


Den 24-05-2017 kl. 11:48 skrev James Kermode:
> Hi Jens Jorgen
>
> Glad to hear its fast for your problem - typical speed up for DFT is 2-10x depending on system size and bonding type.
>
> I’ve not tested it with symmetry, so this does look like a bug. This is happening at the initial stage when PreconLFGS is doing a couple of trial displacements to determine the energy scale of the problem, and it seems these displacements violate the symmetry. How is symmetry implemented in the other optimisers?

The other optimizer don't know anything about symmetry.  They just move 
the atoms along the forces and that seems to just work.  Maybe the trial 
step could be along the initial forces?  But if you need to do more than 
one trial step then I don't know!

Jens Jørgen
>   
>
> Only FixAtoms constraints are currently supported in the preconditioner, which could be related.
>
> James.
>
>> On 24 May 2017, at 10:02, Jens Jørgen Mortensen via ase-users <ase-users at listserv.fysik.dtu.dk> wrote:
>>
>> Hi!
>>
>> I'm running some optimizations with the new PreconLBFGS optimizer and it seems to be very fast.  But only if I turn off use of symmetry in my DFT code.  When I use symmetry (the initial structure has inversion symmetry), GPAW crashes like shown below because PreconLBFGS gives the DFT code some new positions that no longer have inversion symmetry.  Is this a bug in PreconLBFGS?
>>
>> opt = PreconLBFGS(system,
>>                   precon=Exp(A=3),
>>                   use_armijo=True,
>>                   trajectory='opt.traj',
>>                   logfile='opt.log')
>>
>> Jens Jørgen
>>
>> Traceback (most recent call last):
>>   File "opt.py", line 50, in <module>
>>     opt.run(fmax=0.02)
>>   File "/home/niflheim/jensj/ase/ase/optimize/precon/lbfgs.py", line 353, in run
>>     return Optimizer.run(self, fmax, steps)
>>   File "/home/niflheim/jensj/ase/ase/optimize/optimize.py", line 179, in run
>>     self.step(f)
>>   File "/home/niflheim/jensj/ase/ase/optimize/precon/lbfgs.py", line 220, in step
>>     self.precon.make_precon(self.atoms)
>>   File "/home/niflheim/jensj/ase/ase/optimize/precon/precon.py", line 171, in make_precon
>>     self.estimate_mu(atoms)
>>   File "/home/niflheim/jensj/ase/ase/optimize/precon/precon.py", line 494, in estimate_mu
>>     dE_p_plus_v = -atoms_v.get_forces().reshape(-1)
>>   File "/home/niflheim/jensj/ase/ase/atoms.py", line 728, in get_forces
>>     forces = self._calc.get_forces(self)
>>   File "/home/niflheim/jensj/ase/ase/calculators/calculator.py", line 425, in get_forces
>>     return self.get_property('forces', atoms)
>>   File "/home/niflheim/jensj/ase/ase/calculators/calculator.py", line 457, in get_property
>>     self.calculate(atoms, [name], system_changes)
>>   File "/home/niflheim/jensj/gpaw/gpaw/calculator.py", line 265, in calculate
>>     self.set_positions(atoms)
>>   File "/home/niflheim/jensj/gpaw/gpaw/calculator.py", line 443, in set_positions
>>     spos_ac = self.initialize_positions(atoms)
>>   File "/home/niflheim/jensj/gpaw/gpaw/calculator.py", line 435, in initialize_positions
>>     self.wfs.set_positions(spos_ac, atom_partition)
>>   File "/home/niflheim/jensj/gpaw/gpaw/wavefunctions/fdpw.py", line 47, in set_positions
>>     WaveFunctions.set_positions(self, spos_ac, atom_partition)
>>   File "/home/niflheim/jensj/gpaw/gpaw/wavefunctions/base.py", line 204, in set_positions
>>     self.kd.symmetry.check(spos_ac)
>>   File "/home/niflheim/jensj/gpaw/gpaw/symmetry.py", line 248, in check
>>     raise RuntimeError('Broken symmetry!')
>> RuntimeError: Broken symmetry!
>>
>> _______________________________________________
>> ase-users mailing list
>> ase-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users



More information about the ase-users mailing list