Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_molecule(name, orient=True):
"""
Returns a Molecule object from the available stored objects.
"""
fname = get_file_name("molecules", name)
if not fname:
raise OSError("File: {}/{} not found".format("molecules", name))
return Molecule.from_file(fname, orient=orient)
import copy
import json
import jsonschema
from .definitions_schema import get_definition
from .molecule_schema import molecule_schema
from .options_schema import options_schema
__all__ = ["get_schema", "get_table_indices", "get_schema_keys", "validate", "get_hash_fields", "format_result_indices"]
_schemas = {}
# Add in molecule
for req in molecule_schema["required_definitions"]:
molecule_schema["definitions"][req] = get_definition(req)
_schemas["molecule"] = molecule_schema
_schemas["options"] = options_schema
# Load molecule schema
# Collection and hash indices
_table_indices = {
"collection": ("collection", "name"),
"procedure": ("procedure", "program"),
"molecule": ("molecule_hash", "molecular_formula"),
"result": ("molecule_id", "program", "driver", "method", "basis", "options"),
"options": ("program", "name"),
import copy
import json
import jsonschema
from .definitions_schema import get_definition
from .molecule_schema import molecule_schema
from .options_schema import options_schema
__all__ = ["get_schema", "get_table_indices", "get_schema_keys", "validate", "get_hash_fields", "format_result_indices"]
_schemas = {}
# Add in molecule
for req in molecule_schema["required_definitions"]:
molecule_schema["definitions"][req] = get_definition(req)
_schemas["molecule"] = molecule_schema
_schemas["options"] = options_schema
# Load molecule schema
# Collection and hash indices
_table_indices = {
"collection": ("collection", "name"),
"procedure": ("procedure", "program"),
"molecule": ("molecule_hash", "molecular_formula"),
"result": ("molecule_id", "program", "driver", "method", "basis", "options"),
"options": ("program", "name"),
import jsonschema
from .definitions_schema import get_definition
from .molecule_schema import molecule_schema
from .options_schema import options_schema
__all__ = ["get_schema", "get_table_indices", "get_schema_keys", "validate", "get_hash_fields", "format_result_indices"]
_schemas = {}
# Add in molecule
for req in molecule_schema["required_definitions"]:
molecule_schema["definitions"][req] = get_definition(req)
_schemas["molecule"] = molecule_schema
_schemas["options"] = options_schema
# Load molecule schema
# Collection and hash indices
_table_indices = {
"collection": ("collection", "name"),
"procedure": ("procedure", "program"),
"molecule": ("molecule_hash", "molecular_formula"),
"result": ("molecule_id", "program", "driver", "method", "basis", "options"),
"options": ("program", "name"),
"task_queue": ("status", "hash_index", "tag"),
"service_queue": ("status", "hash_index", "tag"),
} # yapf: disable