Exemple #1
0
    def __init__(self, show_text_output=False, write_gpw_file=None,
                 **kwargs):
        self.show_text_output = show_text_output
        # this is used as write(mode=write_gpw_file)
        # so it should be called rather write_gpw_mode?
        if write_gpw_file is not None:
            assert isinstance(write_gpw_file, str)
        self.write_gpw_file = write_gpw_file

        CalculatorFactory.__init__(self, None, 'GPAW', **kwargs)
Exemple #2
0
 def add_options(self, parser):
     CalculatorFactory.add_options(self, parser)
     
     calc = optparse.OptionGroup(parser, 'GPAW')
     calc.add_option('--parameter-file', metavar='FILE',
                     help='Read GPAW parameters from file.')
     calc.add_option('-S', '--show-text-output', action='store_true',
                     help='Send text output from calculation to ' +
                     'standard out.')
     calc.add_option('-W', '--write-gpw-file', metavar='MODE',
                     help='Write gpw file.')
     parser.add_option_group(calc)
Exemple #3
0
    def parse(self, opts, args):
        if opts.parameters:
            # Import stuff that eval() may need to know:
            from gpaw.wavefunctions.pw import PW
            from gpaw.occupations import FermiDirac, MethfesselPaxton
            from gpaw.mixer import Mixer, MixerSum
            from gpaw.poisson import PoissonSolver
            from gpaw.eigensolvers import RMM_DIIS
       
            self.kwargs.update(str2dict(opts.parameters, locals()))
            opts.parameters = None

        CalculatorFactory.parse(self, opts, args)

        self.show_text_output = opts.show_text_output
        self.write_gpw_file = opts.write_gpw_file

        if opts.parameter_file:
            self.kwargs.update(eval(open(opts.parameter_file).read()))
 def __call__(self, name, atoms):
     calculator = CalculatorFactory.__call__(self, name, atoms)
     # needed for cell optimization
     # http://www.abinit.org/documentation/helpfiles/for-v5.8/input_variables/varrlx.html#optcell
     # http://www.abinit.org/documentation/helpfiles/for-v5.8/input_variables/varrlx.html#ecutsm
     if 0:
         calculator.set({'ecutsm': 0.05}) # default 0.0
     # http://forum.abinit.org/viewtopic.php?f=8&t=1335
     if 0:
         calculator.set({'nsym': 1}) # default 0
     return calculator
 def __call__(self, name, atoms):
     calculator = CalculatorFactory.__call__(self, name, atoms)
     # needed for cell optimization
     # http://www.abinit.org/documentation/helpfiles/for-v5.8/input_variables/varrlx.html#optcell
     # http://www.abinit.org/documentation/helpfiles/for-v5.8/input_variables/varrlx.html#ecutsm
     if 0:
         calculator.set({"ecutsm": 0.05})  # default 0.0
     # http://forum.abinit.org/viewtopic.php?f=8&t=1335
     if 0:
         calculator.set({"nsym": 1})  # default 0
     return calculator
 def __init__(self, Class, name, label='label',
              kpts=None, kptdensity=3.0,
              **kwargs):
     CalculatorFactory.__init__(self, Class, name, label,
                                kpts, kptdensity, **kwargs)
 def __init__(self, Class, name, label="label", kpts=None, kptdensity=3.0, **kwargs):
     CalculatorFactory.__init__(self, Class, name, label, kpts, kptdensity, **kwargs)