def define(cls, spec): """Define the specification of the input generator. The ports defined on the specification are the inputs that will be accepted by the ``get_builder`` method. """ super().define(spec) spec.inputs['spin_type'].valid_type = ChoiceType((SpinType.NONE, SpinType.COLLINEAR)) spec.inputs['relax_type'].valid_type = ChoiceType((RelaxType.NONE, RelaxType.POSITIONS)) spec.inputs['electronic_type'].valid_type = ChoiceType((ElectronicType.METAL, ElectronicType.INSULATOR)) spec.inputs['engines']['relax']['code'].valid_type = CodeType('gaussian')
def define(cls, spec): """Define the specification of the input generator. The ports defined on the specification are the inputs that will be accepted by the ``get_builder`` method. """ super().define(spec) spec.inputs['spin_type'].valid_type = ChoiceType( (SpinType.NONE, SpinType.COLLINEAR)) spec.inputs['relax_type'].valid_type = ChoiceType( (RelaxType.NONE, RelaxType.POSITIONS)) spec.inputs['electronic_type'].valid_type = ChoiceType( (ElectronicType.METAL, ElectronicType.INSULATOR)) spec.input('engines.inpgen.code', valid_type=orm.Code, serializer=orm.load_code) spec.input('engines.inpgen.options', valid_type=dict, required=False) spec.inputs['engines']['relax']['code'].valid_type = CodeType( 'fleur.fleur') spec.inputs['engines']['inpgen']['code'].valid_type = CodeType( 'fleur.inpgen')
def define(cls, spec): """Define the specification of the input generator. The ports defined on the specification are the inputs that will be accepted by the ``get_builder`` method. """ super().define(spec) spec.inputs['spin_type'].valid_type = ChoiceType(tuple(SpinType)) spec.inputs['relax_type'].valid_type = ChoiceType([ t for t in RelaxType if t not in (RelaxType.VOLUME, RelaxType.SHAPE, RelaxType.CELL) ]) spec.inputs['electronic_type'].valid_type = ChoiceType( (ElectronicType.METAL, ElectronicType.INSULATOR)) spec.inputs['engines']['relax']['code'].valid_type = CodeType('abinit')