Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better "extras" passing in Molecule for EFP #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
allow empty models.Molecule
  • Loading branch information
loriab committed Sep 3, 2019
commit b4e61e0594008b0bbd60a666eaa0e39d37497573
5 changes: 4 additions & 1 deletion qcelemental/models/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ def __init__(self, orient: bool = False, validate: Optional[bool] = None, **kwar
kwargs["schema_version"] = kwargs.pop("schema_version", 2)
# original_keys = set(kwargs.keys()) # revive when ready to revisit sparsity

schema = to_schema(from_schema(kwargs), dtype=kwargs["schema_version"], copy=False, np_out=True)
schema = to_schema(from_schema(kwargs, missing_enabled_return='minimal'),
dtype=kwargs["schema_version"],
copy=False,
np_out=True)

kwargs["validated"] = True
kwargs = {**kwargs, **schema} # Allow any extra fields
Expand Down
4 changes: 2 additions & 2 deletions qcelemental/molparse/from_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .from_arrays import from_arrays


def from_schema(molschema, *, verbose: int = 1) -> Dict:
def from_schema(molschema, *, missing_enabled_return: str = 'error', verbose: int = 1) -> Dict:
"""Construct molecule dictionary representation from non-Psi4 schema.

Parameters
Expand Down Expand Up @@ -71,7 +71,7 @@ def from_schema(molschema, *, verbose: int = 1) -> Dict:
provenance=ms.get('provenance', None),
connectivity=ms.get('connectivity', None),
domain='qm',
#missing_enabled_return=missing_enabled_return,
missing_enabled_return=missing_enabled_return,
speclabel=False,
#tooclose=tooclose,
#zero_ghost_fragments=zero_ghost_fragments,
Expand Down