to_schema

qcelemental.molparse.to_schema(molrec, dtype, units='Bohr', *, np_out=False, copy=True)[source]

Translate molparse internal Molecule spec into dictionary from other schemas.

Parameters:
  • molrec (Dict[str, Any]) – Psi4 json Molecule spec.

  • dtype (str | int) – {‘psi4’, 1, 2, 3} Molecule schema format. 1 is https://molssi-qc-schema.readthedocs.io/en/latest/auto_topology.html V1 + #44 + #53 2 is 1 with internal schema_name/version (https://github.com/MolSSI/QCSchema/pull/60) 3 is 2 with no change (future: additional field for unit box parameters)

  • units (str) – {‘Bohr’, ‘Angstrom’} Units in which to write string. There is not an option to write in intrinsic/input units. Some dtype may not allow all units.

  • np_out (bool) – When True, fields originating from geom, elea, elez, elem, mass, real, elbl will be ndarray. Use False to get a json-able version.

  • copy (bool)

Returns:

qcschema – Dictionary of the dtype repr of molrec.

Return type:

dict