[gpaw-users] How to send stop signal to GPAW

Jens Jørgen Mortensen jensj at fysik.dtu.dk
Thu Dec 8 08:09:15 CET 2011


On 08-12-2011 08:01, Jens Jørgen Mortensen wrote:
> On 07-12-2011 11:30, Zeljko Sljivancanin wrote:
>> Dear gpaw-users,
>>
>> in Dacapo code was possible to send a stop signal ( echo '0'>   stop) to stop
>> the code after all relevant information are written in two output files.
>>
>> Could you  please tell me if something similar is possible with GPAW?
> No, there is no such thing.  You might be able to use the attach method
> of the calculator object to attach an observer function that does
> something like that:
>
>     https://wiki.fysik.dtu.dk/gpaw/devel/paw.html#gpaw.paw.PAW.attach
>
> def f():
>       calc.write('results.gpw')
>       calc.scf.converged = True
> calc.attach(f)

What I meant to write was (untested):

import os
def f():
     if os.path.isfile('stop'):
         calc.write('results.gpw')
         calc.scf.converged = True
calc.attach(f)

Jens Jørgen

> Jens Jørgen
>
>> Best regards,
>> Zeljko Sljivancanin
>>
>> Vinca Institute of Nucl. Sciences
>> P.O.Box 522
>> 11001 Belgrade
>> Serbia
>>
>> _______________________________________________
>> gpaw-users mailing list
>> gpaw-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users



More information about the gpaw-users mailing list