Hi all,
I have 3 unit tests failing in my branch in test_dilute_solution_model.
All of them use simpy so I guess it's due to a portability problem in sympy.
I'm using Python 2.7.3, sympy 0.7.5 and numpy 1.8..1
ERROR: test_plot_data_with_chem_pot (pymatgen.analysis.defects.tests.test_dilute_solution_model.DiluteSolutionModelTest)
Traceback (most recent call last):
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/tests/test_dilute_solution_model.py", line 66, in test_plot_data_with_chem_pot
trial_chem_pot=self.trial_mu,generate='plot')
File "/Users/gmatteo/Coding/git_branches/monty/monty/dev.py", line 88, in decorated
return _callable(_args, *_kwargs)
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/dilute_solution_model.py", line 372, in dilute_solution_model
x = nsolve(vector_func,mu,mu_vals,module="numpy")
File "/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/sympy/solvers/solvers.py", line 2475, in nsolve
x = findroot(f, x0, J=J, **kwargs)
File "/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/sympy/mpmath/calculus/optimization.py", line 975, in findroot
% (norm(f(*xl))**2, tol))
ValueError: Could not find root within given tolerance. (1.43144e-12 > 2.1684e-19)
Try another starting point or tweak arguments.
ERROR: test_plot_data_without_chem_pot (pymatgen.analysis.defects.tests.test_dilute_solution_model.DiluteSolutionModelTest)
Traceback (most recent call last):
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/tests/test_dilute_solution_model.py", line 59, in test_plot_data_without_chem_pot
self.struct,self.e0,self.vac,self.asites,self.T,generate='plot')
File "/Users/gmatteo/Coding/git_branches/monty/monty/dev.py", line 88, in decorated
return _callable(_args, *_kwargs)
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/dilute_solution_model.py", line 372, in dilute_solution_model
x = nsolve(vector_func,mu,mu_vals,module="numpy")
File "/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/sympy/solvers/solvers.py", line 2475, in nsolve
x = findroot(f, x0, J=J, **kwargs)
File "/Users/gmatteo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/sympy/mpmath/calculus/optimization.py", line 975, in findroot
% (norm(f(*xl))**2, tol))
ValueError: Could not find root within given tolerance. (1.43144e-12 > 2.1684e-19)
Try another starting point or tweak arguments.
-------------------- >> begin captured stdout << ---------------------
[-7.952002320183595, -6.118608940188247]
--------------------- >> end captured stdout << ----------------------
ERROR: test_plot_data_without_chem_pot (pymatgen.analysis.defects.tests.test_dilute_solution_model.SoluteSiteFinderTest)
Traceback (most recent call last):
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/tests/test_dilute_solution_model.py", line 88, in test_plot_data_without_chem_pot
solute_concen=0.01)
File "/Users/gmatteo/Coding/git_branches/monty/monty/dev.py", line 88, in decorated
return _callable(_args, *_kwargs)
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/dilute_solution_model.py", line 916, in solute_site_preference_finder
mu_vals = compute_mus()
File "/Users/gmatteo/Coding/git_branches/pymatgen/pymatgen/analysis/defects/dilute_solution_model.py", line 897, in compute_mus
m0 = mu_red[mu[0]].subs([(mu[1],m1),(mu[2],m2)])
TypeError: list indices must be integers, not Symbol
-------------------- >> begin captured stdout << ---------------------
(u'mult', [1, 1])
(u'c0', array([[1, 0, 0],
[0, 1, 0],
[0, 0, 0]]))
(u'site_specie', [u'Al', u'Ni', u'Fe'])
(u'site_mu_map', [0, 1, 2])
(u'specie_site_index_map', [(0, 1), (1, 2), (2, 3)])
[[[-1 1]
[-1 0]
[-1 0]]
[[ 0 -1]
[ 1 -1]
[ 0 -1]]
[[ 0 0]
[ 0 0]
[ 1 1]]]
(u'Ni', u'Al')
(u'Al', u'Al')
(1, 1)
(u'se', -2.08)
(u'Al', u'Ni')
(u'Al', u'Ni')
(1, 2)
(u'Ni', u'Ni')
(2, 2)
(u'se', -1.674)
(u'dE', array([[ 6.56 , 3.98 ],
[-0.41 , 7.101],
[-2.08 , -1.674]]))
1
-mu0
(1, -1, 6.5599999999999996)
-mu0 + mu1
(1, -1, -0.40999999999999998)
-mu0 + mu2
(1, -1, -2.0800000000000001)
0
mu0 - mu1
(1, 1, 3.98)
-mu1
(1, 0, 7.101)
-mu1 + mu2
(1, 0, -1.6739999999999999)
0
-mu0
(1, 0, 6.5599999999999996)
-mu0 + mu1
(1, 1, -0.40999999999999998)
-mu0 + mu2
(1, 0, -2.0800000000000001)
1
mu0 - mu1
(1, -1, 3.98)
-mu1
(1, -1, 7.101)
-mu1 + mu2
(1, -1, -1.6739999999999999)
0
-mu0
(1, 0, 6.5599999999999996)
-mu0 + mu1
(1, 0, -0.40999999999999998)
-mu0 + mu2
(1, 1, -2.0800000000000001)
0
mu0 - mu1
(1, 0, 3.98)
-mu1
(1, 0, 7.101)
-mu1 + mu2
(1, 1, -1.6739999999999999)
--------c---------
Matrix([[-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 116.495530311892_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1) - 30390627980.6672_exp(-11.6045192825566_mu0 + 11.6045192825566_mu2) + 1, 8.74340942767173e-21_exp(11.6045192825566_mu0 - 11.6045192825566_mu1)]])
Matrix([[116.495530311892_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1), -1.63129132051346e-36_exp(-11.6045192825566_mu1) - 8.74340942767173e-21_exp(11.6045192825566_mu0 - 11.6045192825566_mu1) - 273268470.678974_exp(-11.6045192825566_mu1 + 11.6045192825566_mu2) + 1]])
Matrix([[30390627980.6672_exp(-11.6045192825566_mu0 + 11.6045192825566_mu2), 273268470.678974_exp(-11.6045192825566_mu1 + 11.6045192825566_mu2)]])
--------c---------
-------c_ratio-------------
(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 116.495530311892_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1) - 30390627980.6672_exp(-11.6045192825566_mu0 + 11.6045192825566_mu2) + 8.74340942767173e-21_exp(11.6045192825566_mu0 - 11.6045192825566_mu1) + 1)/(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 1.63129132051346e-36_exp(-11.6045192825566_mu1) + 2)
(-1.63129132051346e-36_exp(-11.6045192825566_mu1) + 116.495530311892_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1) - 8.74340942767173e-21_exp(11.6045192825566_mu0 - 11.6045192825566_mu1) - 273268470.678974_exp(-11.6045192825566_mu1 + 11.6045192825566_mu2) + 1)/(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 1.63129132051346e-36_exp(-11.6045192825566_mu1) + 2)
(30390627980.6672_exp(-11.6045192825566_mu0 + 11.6045192825566_mu2) + 273268470.678974_exp(-11.6045192825566_mu1 + 11.6045192825566_mu2))/(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 1.63129132051346e-36_exp(-11.6045192825566_mu1) + 2)
(u'mu_red', [])
(u'y_vect', [0.0, 0.0, 0.01])
[-(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 116.495530311892_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1) - 30390627980.6672_exp(-11.6045192825566_mu0 + 11.6045192825566_mu2) + 8.74340942767173e-21_exp(11.6045192825566_mu0 - 11.6045192825566_mu1) + 1)/(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 1.63129132051346e-36_exp(-11.6045192825566_mu1) + 2), -(-1.63129132051346e-36_exp(-11.6045192825566_mu1) + 116.495530311892_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1) - 8.74340942767173e-21_exp(11.6045192825566_mu0 - 11.6045192825566_mu1) - 273268470.678974_exp(-11.6045192825566_mu1 + 11.6045192825566_mu2) + 1)/(-8.69064072818453e-34_exp(-11.6045192825566_mu0) - 1.63129132051346e-36_exp(-11.6045192825566_mu1) + 2), -mu0 - mu1 - 7.48901399237441e-35_exp(-11.6045192825566_mu0) - 1.40573795500994e-37_exp(-11.6045192825566_mu1) - 10.0388070781185_exp(-11.6045192825566_mu0 + 11.6045192825566_mu1) - 7.53448653475411e-22_exp(11.6045192825566_mu0 - 11.6045192825566_mu1) - 10.65875]
--------------------- >> end captured stdout << ----------------------
Ran 787 tests in 232.675s
FAILED (SKIP=128, errors=3)