AtomicComputer

class psi4.driver.AtomicComputer(**data)[source]

Bases: psi4.driver.task_base.BaseComputer

Computer for analytic single-geometry computations.

Parameters
  • molecule (Any) – The molecule to use in the computation.

  • basis (str) – The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, …).

  • method (str) – The quantum chemistry method to evaluate (e.g., B3LYP, MP2, …).

  • driver ({energy,gradient,hessian,properties}) – The resulting type of computation: energy, gradient, hessian, properties.Note for finite difference that this should be the target driver, not the means driver.

  • keywords (Dict[Any], Optional) – The keywords to use in the computation.

  • computed (bool, Default: False) – Whether quantum chemistry has been run on this task.

  • result (Any, Optional) – AtomicResult return.

  • result_id (str, Optional) – The optional ID for the computation.

  • extra_data (Any) –

Return type

None

Methods Summary

compare(other, **kwargs)

Compares the current object to the provided object recursively.

compute([client])

Run quantum chemistry.

construct([_fields_set])

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.

copy(*[, include, exclude, update, deep])

Duplicate a model, optionally choose which fields to include, exclude and change.

dict(**kwargs)

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

from_orm(obj)

rtype

Model

get_results([client])

Return results as Atomic-flavored QCSchema.

json(**kwargs)

Generate a JSON representation of the model, include and exclude arguments as per dict().

parse_file(path, *[, encoding])

Parses a file into a Model object.

parse_obj(obj)

rtype

Model

parse_raw(data, *[, encoding])

Parses raw string or bytes into a Model object.

plan()

Form QCSchema input from member data.

schema([by_alias, ref_template])

rtype

DictStrAny

schema_json(*[, by_alias, ref_template])

rtype

unicode

serialize(encoding, *[, include, exclude, ...])

Generates a serialized representation of the model

set_basis(basis)

set_keywords(keywords)

set_method(method)

update_forward_refs(**localns)

Try to update ForwardRefs on fields based on this Model, globalns and localns.

validate(value)

rtype

Model

Methods Documentation

compare(other, **kwargs)

Compares the current object to the provided object recursively.

Parameters
  • other (Model) – The model to compare to.

  • **kwargs – Additional kwargs to pass to qcelemental.compare_recursive.

Returns

True if the objects match.

Return type

bool

compute(client=None)[source]

Run quantum chemistry.

Parameters

client (Optional[FractalClient]) –

classmethod construct(_fields_set=None, **values)

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Return type

Model

Parameters
copy(*, include=None, exclude=None, update=None, deep=False)

Duplicate a model, optionally choose which fields to include, exclude and change.

Parameters
  • include (Union[AbstractSetIntStr, MappingIntStrAny]) – fields to include in new model

  • exclude (Union[AbstractSetIntStr, MappingIntStrAny]) – fields to exclude from new model, as with values this takes precedence over include

  • update (DictStrAny) – values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data

  • deep (bool) – set to True to make a deep copy of the model

  • self (Model) –

Return type

Model

Returns

new model instance

dict(**kwargs)

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Return type

Dict[str, Any]

classmethod from_orm(obj)
Return type

Model

Parameters

obj (Any) –

get_results(client=None)[source]

Return results as Atomic-flavored QCSchema.

Return type

AtomicResult

Parameters

client (Optional[FractalClient]) –

json(**kwargs)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

classmethod parse_file(path, *, encoding=None)

Parses a file into a Model object.

Parameters
  • path (Union[str, Path]) – The path to the file.

  • encoding (str, optional) – The type of the files, available types are: {‘json’, ‘msgpack’, ‘pickle’}. Attempts to automatically infer the file type from the file extension if None.

Returns

The requested model from a serialized format.

Return type

Model

classmethod parse_obj(obj)
Return type

Model

Parameters

obj (Any) –

classmethod parse_raw(data, *, encoding=None)

Parses raw string or bytes into a Model object.

Parameters
  • data (Union[bytes, str]) – A serialized data blob to be deserialized into a Model.

  • encoding (str, optional) – The type of the serialized array, available types are: {‘json’, ‘json-ext’, ‘msgpack-ext’, ‘pickle’}

Returns

The requested model from a serialized format.

Return type

Model

plan()[source]

Form QCSchema input from member data.

Return type

AtomicInput

classmethod schema(by_alias=True, ref_template='#/definitions/{model}')
Return type

DictStrAny

Parameters
  • by_alias (bool) –

  • ref_template (unicode) –

classmethod schema_json(*, by_alias=True, ref_template='#/definitions/{model}', **dumps_kwargs)
Return type

unicode

Parameters
  • by_alias (bool) –

  • ref_template (unicode) –

  • dumps_kwargs (Any) –

serialize(encoding, *, include=None, exclude=None, exclude_unset=None, exclude_defaults=None, exclude_none=None)

Generates a serialized representation of the model

Parameters
  • encoding (str) – The serialization type, available types are: {‘json’, ‘json-ext’, ‘msgpack-ext’}

  • include (Optional[Set[str]], optional) – Fields to be included in the serialization.

  • exclude (Optional[Set[str]], optional) – Fields to be excluded in the serialization.

  • exclude_unset (Optional[bool], optional) – If True, skips fields that have default values provided.

  • exclude_defaults (Optional[bool], optional) – If True, skips fields that have set or defaulted values equal to the default.

  • exclude_none (Optional[bool], optional) – If True, skips fields that have value None.

Returns

The serialized model.

Return type

Union[bytes, str]

classmethod set_basis(basis)[source]
classmethod set_keywords(keywords)[source]
classmethod set_method(method)[source]
classmethod update_forward_refs(**localns)

Try to update ForwardRefs on fields based on this Model, globalns and localns.

Return type

None

Parameters

localns (Any) –

classmethod validate(value)
Return type

Model

Parameters

value (Any) –