Commit ac0cddb3 authored by nsoler's avatar nsoler
Browse files

calculate_A_spaces.py

parent ab6b69a9
......@@ -59,6 +59,7 @@ from chemicalchecker.database import Dataset, Molecule
from chemicalchecker.database.database import test_connection
from chemicalchecker.util import logged, Config
from chemicalchecker.util.decorator import cached_property
from chemicalchecker.util.models import import_models # import models for predicting sign1, sign2
@logged
......@@ -466,6 +467,23 @@ class ChemicalChecker():
from chemicalchecker.core.diagnostics import Diagnosis
return Diagnosis(self, sign, **kwargs)
def import_model(self,sign,version='2020_01'):
"""
Nico: copy the models files we store in chemicalchecker.utils.models into sign.model_path
in order to use the predict functions
sign (signature object), converted to reference if needed, since the models are stored there
version (str) : ex: 2020_01
"""
sign2=sign
if sign.molset != 'reference':
sign2= self.get_signature(sign.cctype, 'reference', sign.dataset)
import_models(sign2, version=version)
def import_h5(self):
"""Recovers h5 files from a given custom directory.
......
......@@ -7,4 +7,4 @@ from .parser import Parser
from .converter import Converter
from .data_calculator import DataCalculator
from .features_A_spaces import fetch_features_A
from .calculate_A_spaces import Aspaces_prop_calculator
#from .calculate_A_spaces import Aspaces_prop_calculator
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