[ase-users] [ase-developers] ASE calculator interface proposal
John Kitchin
jkitchin at andrew.cmu.edu
Mon Jan 28 03:05:14 CET 2013
Here I prefer a simple interface specification, e.g. the calculator has a
"calculate" function, and each calculator implements as appropriate, e.g.
system calls or execfile.
John
-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
On Thu, Jan 24, 2013 at 5:58 AM, Jussi Enkovaara
<jussi.enkovaara at aalto.fi>wrote:
> On 2013-01-24 12:14, Marcin Dulak wrote:
> >> One question that should maybe also discussed is if there should
> >> standard way to specify the command/binary to be executed when
> >> calculator is run. Some calculators (e.g. Siesta) request a python
> >> script containing the actual command to be executed, while other
> >> calculators (e.g. Castep) ask for a shell command. I prefer the shell
> >> command, as it is easier to specify e.g. number of CPUs within a batch
> >> job script (at least for casual user who is used to do something like
> >> 'mpirun -np 8 siesta'). People wanting to script everything may prefer
> >> the first option...
> > i think the best way is to have a choice here.
> > For example aims interface
> > (
> https://trac.fysik.dtu.dk/projects/ase/browser/trunk/ase/calculators/aims.py
> )
> > offers you the choice of
> > providing the run command as an init argument *run_command*
> > or reading the AIMS_COMMAND environment variable.
> > Some run commands may get quite involved:
> >
> https://listserv.fysik.dtu.dk/pipermail/ase-developers/2012-November/001601.html
>
> In the aims calculator the *run_command* seems to be just another way of
> specifying the shell command to be run. I think the main difference is
> whether the calculator uses "execfile" (as in siesta) or "os.system" as
> in aims. In case of execfile, the command has to be Python script, while
> os.system (or maybe in a more modern fashion subprocess.call) allows any
> shell commands/scripts. On the other hand execfile allows passing data
> between the namespaces of scripts. It would be of course possible to
> have both execfile and os.system options, and support
> both calculator keyword (i.e. run_command) and environment variable,
> but some standard convention might be nice.
>
> > I like the related idea that there is a standard calculator method that
> > verifies if the code
> > has been installed and configured (i'm using *get_command* - see again
> > the aims interface).
> > In the tests one calls this method and raises NotAvailable to skip the
> test
> > (see
> >
> https://trac.fysik.dtu.dk/projects/ase/browser/trunk/ase/test/aims/aims_cmdline.py
> )
>
> +1
>
> Best regards,
> Jussi
> _______________________________________________
> ase-developers mailing list
> ase-developers at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20130127/08853a9f/attachment.html>
More information about the ase-users
mailing list