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

Add gdb format molecule reading #291

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
Next Next commit
allow gdb to work through Molecule
  • Loading branch information
loriab committed Jun 12, 2022
commit a72c726446d3605b0fa6a3121e6a458173f42d72
4 changes: 2 additions & 2 deletions qcelemental/models/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def from_data(
else:
raise TypeError("Input type not understood, please supply the 'dtype' kwarg.")

if dtype in ["string", "psi4", "xyz", "xyz+"]:
if dtype in ["string", "psi4", "xyz", "xyz+", "gdb"]:
mol_dict = from_string(data, dtype if dtype != "string" else None)
assert isinstance(mol_dict, dict)
input_dict = to_schema(mol_dict["qm"], dtype=2, np_out=True)
Expand Down Expand Up @@ -946,7 +946,7 @@ def from_file(cls, filename: str, dtype: Optional[str] = None, *, orient: bool =
dtype = "string"

# Raw string type, read and pass through
if dtype in ["string", "xyz", "xyz+", "psi4"]:
if dtype in ["string", "xyz", "xyz+", "psi4", "gdb"]:
with open(filename, "r") as infile:
data = infile.read()
elif dtype == "numpy":
Expand Down