[ase-users] Phase diagram: only_show_simplices
Adam Carlsson
adam.carlsson at liu.se
Mon Jan 27 08:41:35 CET 2020
Dear ASE users,
I am following the tutorial of the genetic algorithm (GA), https://wiki.fysik.dtu.dk/ase/tutorials/ga/ga_convex_hull.html and when running the following script, which may be found in the previous link, I stumble upon an error regarding the "only_show_simplices" input argument of a phasediagram class.
import numpy as np
from ase.phasediagram import PhaseDiagram
from ase.db import connect
from ase.io import write
db = connect('hull.db')
# Select the evaluated candidates and retrieve the chemical formula and mixing
# energy for the phase diagram
refs = []
dcts = list(db.select('relaxed=1'))
for dct in dcts:
refs.append((dct.formula, -dct.raw_score))
pd = PhaseDiagram(refs)
pd.plot(only_label_simplices=True)
# View the simplices of the convex hull
simplices = []
toview = sorted(np.array(dcts)[pd.hull], key=lambda x: x.mass)
for dct in toview:
simplices.append(dct.toatoms())
write('hull.traj', simplices)
#end of script
However, I am stumbling upon this following error:
File "plot_convex_hull.py", line 31, in <module>
pd.plot(only_label_simplices=True)
TypeError: plot() got an unexpected keyword argument 'only_label_simplices'
And when investigating the phasediagram.py, I can not obtain any information regarding the alternative of only showing simplices? Hence I am wondering if the "only_label_simplices" is a valid input argument or not?
I would very much like to have the alternative of only demonstrating the simplices and I have previously tried to implement the feature but with no success. I would very much like to have some clarity regarding this input tag for phasediagrams.
I should mention I am running ASE/3.18 and Python/3.7.2
Best regards,
Adam Carlsson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200127/0070a7b2/attachment-0001.html>
More information about the ase-users
mailing list