from_dict#

optking.opt_helper.from_dict(input_obj: dict, type='', dtype=1) dict[source]#

Attempt to create a dictionary with required elements of an OptimizationInput from user input. User is not required to specify a full OptimizationInput. Used by OptHelper classes If input is of wrong type, will attempt to identify type of input and create schema.

Parameters:
  • input_obj (dict) – A dictionary formatted according to either qcel.models.Molecule or qcel.models.OptimizationInput

  • type (str (optional)) – A hint at which type of schema is being provided. Corresponds to ‘schema_name’ field.

Returns:

opt_input – An OptimizationInput with at least an initial_molecule. input_specification may be empty. This is not an issue for CustomHelper where no input_spec is needed.

Return type:

dict