Commit 9468b150 authored by eric pellegrini's avatar eric pellegrini
Browse files

Modify the behaviour of MMTK database in case of an unknown element: now

create the mmtk + MDANSE dbs corresponding entries
parent 85a51bb3
......@@ -38,7 +38,7 @@ from MDANSE.Core.DataController import DATA_CONTROLLER
from MDANSE.Core.Platform import PLATFORM
from MDANSE.Core.ClassRegistry import ClassRegistry as REGISTRY
from MDANSE.Data.ElementsDatabase import ELEMENTS
from MDANSE.Data.ElementsDatabase import ELEMENTS, create_mmtk_atom_entry
from MDANSE.Core.Preferences import PREFERENCES
......@@ -80,7 +80,10 @@ def databasePath(filename, directory, try_direct = False):
if entries is None:
if directory == "Atoms":
return os.path.join(PLATFORM.local_mmtk_database_directory(),"Atoms", basename)
raise IOError("Database entry %s/%s not found" % (directory, filename))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment