crystal_toolkit.components.phase_diagram module

class crystal_toolkit.components.phase_diagram.PhaseDiagramComponent(*args, **kwargs)[source]

Bases: MPComponent

static clean_formula(formula)[source]
colorscale = [[0.0, '#008d00'], [0.1111111111111111, '#4b9f3f'], [0.2222222222222222, '#73b255'], [0.3333333333333333, '#97c65b'], [0.4444444444444444, '#b9db53'], [0.5555555555555556, '#ffdcdf'], [0.6666666666666666, '#ffb8bf'], [0.7777777777777778, '#fd92a0'], [0.8888888888888888, '#f46b86'], [1.0, '#e24377']]
create_markers(plotter, pd)[source]
static create_table_content(pd)[source]
create_unstable_markers(plotter, pd)[source]
default_3d_axis = {'autorange': True, 'showaxeslabels': False, 'showgrid': False, 'showline': False, 'showspikes': False, 'showticklabels': False, 'ticks': '', 'title': None, 'visible': False, 'zeroline': False}
default_binary_plot_style = {'height': 550, 'hovermode': 'closest', 'legend': {'orientation': 'h', 'tracegroupgap': 5, 'traceorder': 'reversed', 'x': 1.0, 'xanchor': 'right', 'y': 1.08}, 'margin': {'b': 70, 'l': 80, 'r': 20, 't': 10}, 'paper_bgcolor': 'rgba(0,0,0,0)', 'plot_bgcolor': 'rgba(0,0,0,0)', 'showlegend': True, 'width': 500, 'xaxis': {'anchor': 'y', 'mirror': 'ticks', 'nticks': 8, 'showgrid': False, 'showline': True, 'side': 'bottom', 'tickfont': {'size': 16.0}, 'ticks': 'inside', 'title': 'Fraction', 'titlefont': {'color': '#000000', 'size': 24.0}, 'type': 'linear', 'zeroline': False}, 'yaxis': {'anchor': 'x', 'mirror': 'ticks', 'nticks': 7, 'showgrid': False, 'showline': True, 'side': 'left', 'tickfont': {'size': 16.0}, 'ticks': 'inside', 'title': 'Formation energy (eV/fu)', 'titlefont': {'color': '#000000', 'size': 24.0}, 'type': 'linear', 'zeroline': False}}
default_quaternary_plot_style = {'autosize': True, 'height': 450, 'hovermode': 'closest', 'legend': {'orientation': 'h', 'tracegroupgap': 5, 'traceorder': 'reversed', 'x': 1.0, 'xanchor': 'right', 'y': 1.08}, 'margin': {'b': 30, 'l': 30, 'pad': 0, 'r': 20, 't': 0}, 'paper_bgcolor': 'rgba(0,0,0,0)', 'plot_bgcolor': 'rgba(0,0,0,0)', 'scene': {'xaxis': {'autorange': True, 'showaxeslabels': False, 'showgrid': False, 'showline': False, 'showspikes': False, 'showticklabels': False, 'ticks': '', 'title': None, 'visible': False, 'zeroline': False}, 'yaxis': {'autorange': True, 'showaxeslabels': False, 'showgrid': False, 'showline': False, 'showspikes': False, 'showticklabels': False, 'ticks': '', 'title': None, 'visible': False, 'zeroline': False}, 'zaxis': {'autorange': True, 'showaxeslabels': False, 'showgrid': False, 'showline': False, 'showspikes': False, 'showticklabels': False, 'ticks': '', 'title': None, 'visible': False, 'zeroline': False}}, 'showlegend': True}
default_table_params = [{'col': 'Material ID', 'edit': False}, {'col': 'Formula', 'edit': True}, {'col': 'Formation Energy (eV/atom)', 'edit': True}, {'col': 'Energy Above Hull (eV/atom)', 'edit': False}, {'col': 'Predicted Stable?', 'edit': False}]
default_ternary_plot_style = {'autosize': True, 'height': 450, 'hovermode': 'closest', 'legend': {'orientation': 'h', 'tracegroupgap': 5, 'traceorder': 'reversed', 'x': 1.0, 'xanchor': 'right', 'y': 1.08}, 'margin': {'b': 30, 'l': 30, 'pad': 0, 'r': 20, 't': 0}, 'paper_bgcolor': 'rgba(0,0,0,0)', 'plot_bgcolor': 'rgba(0,0,0,0)', 'showlegend': True, 'width': 500, 'xaxis': {'autorange': True, 'showgrid': False, 'showline': False, 'showticklabels': False, 'ticks': '', 'title': None, 'zeroline': False}, 'yaxis': {'autorange': True, 'showgrid': False, 'showline': False, 'showticklabels': False, 'ticks': '', 'title': None, 'zeroline': False}}
empty_plot_style = {'paper_bgcolor': 'rgba(0,0,0,0)', 'plot_bgcolor': 'rgba(0,0,0,0)', 'xaxis': {'visible': False}, 'yaxis': {'visible': False}}
empty_row = {'Energy Above Hull (eV/atom)': None, 'Formation Energy (eV/atom)': 'INSERT', 'Formula': 'INSERT', 'Material ID': None, 'Predicted Stable': None}
figure_layout(plotter, pd)[source]
generate_callbacks(app, cache)[source]

Generate all callbacks associated with the layouts in this app. Assume that “suppress_callback_exceptions” is True, since it is not always guaranteed that all layouts will be displayed to the end user at all times, but it’s important the callbacks are defined on the server.

layout()[source]
Returns

A Dash layout for the full component. Basic implementation

provided, but should in general be overridden.

static ternary_plot(plot_data)[source]

Return a ternary phase diagram in a two-dimensional plot.

Parameters

plot_data – plot data from PDPlotter

Returns: go.Figure

class crystal_toolkit.components.phase_diagram.PhaseDiagramPanelComponent(*args, **kwargs)[source]

Bases: PanelComponent

property description
property title
update_contents(new_store_contents, *args)[source]