Commit 8ee250f2 by eric pellegrini

bug fix due to missing import in ElementsDatabaseEditor

bug fix when loading trajectory with unknown MMTK atoms
parent 60a019ed
......@@ -35,7 +35,7 @@ import os
import wx
import wx.grid as wxgrid
from MDANSE import ELEMENTS
from MDANSE import ELEMENTS, PLATFORM
from MDANSE.Core.Error import Error
from MDANSE.Core.Singleton import Singleton
......
......@@ -52,3 +52,12 @@ from MMTK import Database
# The default database is still the MMTK one
Database.path.append(os.path.join(PLATFORM.package_directory(), 'Data'))
Database.path.append(os.path.join(PLATFORM.application_directory(), 'mmtk_database'))
# Update the database with user defined atom entries
import glob
userDefinedAtoms = glob.glob(os.path.join(PLATFORM.application_directory(), 'mmtk_database','Atoms','*'))
for atomFile in userDefinedAtoms:
atomName = os.path.basename(atomFile)
if not ELEMENTS.has_element(atomName):
ELEMENTS.add_element(atomName)
\ No newline at end of file
Markdown is supported
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