Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if name == 'asap':
from asap3 import EMT
return CalculatorFactory(EMT, 'Asap', None, 'no k-points', **kwargs)
if name == 'elk':
from ase.calculators.elk import ELK
return CalculatorFactory(ELK, 'ELK', 'label', **kwargs)
if name == 'fleur':
from ase.calculators.fleur import FLEUR
return CalculatorFactory(FLEUR, 'FLEUR', 'workdir', **kwargs)
if name == 'gpaw':
from gpaw.factory import GPAWFactory
return GPAWFactory(**kwargs)
if name == 'hotbit':
from hotbit import Calculator
return CalculatorFactory(Calculator, 'Hotbit', 'txt', 'no k-points',
**kwargs)
if name == 'jacapo':
from ase.calculators.jacapo import Jacapo
return CalculatorFactory(Jacapo, 'Jacapo', 'nc', **kwargs)
if name == 'vasp':
from ase.calculators.vasp import Vasp
return CalculatorFactory(Vasp, 'Vasp', None, **kwargs)
classname = classnames.get(name, name.title())
module = __import__('ase.calculators.' + name, {}, None, [classname])