From e2c9b30ba441da9b49f552e2a877086b6a99ea87 Mon Sep 17 00:00:00 2001 From: Chazeon Date: Sat, 2 Jan 2021 03:12:35 -0500 Subject: [PATCH] Move symmetry data file path construction to util/fill.py --- cij/util/fill.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cij/util/fill.py b/cij/util/fill.py index 01faf83..9ec8342 100644 --- a/cij/util/fill.py +++ b/cij/util/fill.py @@ -8,6 +8,8 @@ import numpy from sympy.parsing.sympy_parser import parse_expr +from cij.data import get_data_fname + def fill_cij( elast: pandas.DataFrame, @@ -49,8 +51,17 @@ def fill_cij( a = numpy.array(a) b = numpy.array(b) + # constraints + # ... try to find constraints file + + if not Path(constraints).exists(): + constraints = Path("constraints") / constraints + constraints = get_data_fname(str(constraints)) + + # ... apply constraints + eqns = [] with open(constraints) as fp: