ironflow.nodes.pyiron.atomistics_nodes module

Ryven nodes specifc to pyiron (or with ironflow improvements like an ipywidgets representation).

class ironflow.nodes.pyiron.atomistics_nodes.ApplyStrain_Node(params)[source]

Bases: OutputsOnlyAtoms

Apply strain on atomic structure supercell.

Inputs:

structure (pyiron_atomistics.Atoms): The atomic structure to strain. strain (float): The isotropic strain to apply, where 0 is unstrained. (Default is 0.)

Outputs:

(pyiron_atomistics.Atoms): A strained copy of the input structure.

init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
title = 'ApplyStrain'
update_event(inp=-1)[source]

Must set output 0 to an instance of pyiron_atomistics.atomistics.atoms.Atoms

class ironflow.nodes.pyiron.atomistics_nodes.BeautifulHasGroups(has_groups: HasGroups | None)[source]

Bases: object

A helper class for giving classes that inherit from pyiron_base.HasGroups a more appealing representation in ipywidgets.

to_builtin(has_groups=None)[source]
class ironflow.nodes.pyiron.atomistics_nodes.BulkStructure_Node(params)[source]

Bases: OutputsOnlyAtoms

Generate a bulk atomic structure.

Inputs:

element (str): The atomic symbol for the desired atoms. (Default is “Fe”.) crystal_structure (str | None): Must be one of sc, fcc, bcc, hcp, diamond, zincblende,

rocksalt, cesiumchloride, fluorite or wurtzite.

a (float | None): Lattice constant. c (float | None): Lattice constant. c_over_a (float | None): c/a ratio used for hcp. Default is ideal ratio: sqrt(8/3). u (float | None): Internal coordinate for Wurtzite structure. orthorhombic (bool): Construct orthorhombic unit cell instead of primitive cell. (Takes precedence over cubic

flag when both are true.)

cubic (bool): Construct cubic unit cell if possible.

Outputs:

structure (pyiron_atomistics.Atoms): A mono-species bulk structure.

init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
place_event()[source]

place_event() is called once the node object has been fully initialized and placed in the flow. When loading content, place_event() is executed before the connections are built, which is important for nodes that need to update once and, during this process, set output data values, to prevent later connected (potentially sequential) nodes from receiving false updates because of that. Notice that this method gets executed every time the node is added to the flow, which can happen multiple times for the same object, for example due to undo/redo operations. Also note that GUI content is usually not accessible yet from here, for that use view_place_event().

title = 'BulkStructure'
update_event(inp=-1)[source]

Must set output 0 to an instance of pyiron_atomistics.atomistics.atoms.Atoms

class ironflow.nodes.pyiron.atomistics_nodes.Click_Node(params)[source]

Bases: Node

color = '#99dd55'
init_inputs: List[NodeInputBP] = []
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
main_widget_class

alias of ButtonNodeWidget

title = 'Click'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.ExecCounter_Node(params)[source]

Bases: DualNodeBase

color = '#5d95de'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
title = 'ExecCounter'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.ForEach_Node(params)[source]

Bases: Node

color = '#b33a27'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>, <ryvencore.NodePortBP.NodeOutputBP object>, <ryvencore.NodePortBP.NodeOutputBP object>]
title = 'ForEach'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.GenericOutput_Node(params)[source]

Bases: Node

Select Generic Output item.

Inputs:
job (AtomisticGenericJob): A job with an output attribute of type

pyiron_atomistics.atomistics.job.atomistic.GenericOutput.

field (dtypes.Choice): Which output field to look at. Automatically populates once the job is valid.

Outputs:

output (numpy.ndarray): The selected output field.

color = '#c69a15'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
title = 'GenericOutput'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.IntRand_Node(params)[source]

Bases: Node

Generate a random non-negative integer.

Inputs:

high (int): Biggest possible integer. (Default is 1). length (int): How many random numbers to generate. (Default is 1.)

Outputs:

randint (int|numpy.ndarray): The randomly generated value(s).

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
title = 'IntRandom'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

class ironflow.nodes.pyiron.atomistics_nodes.JobName_Node(params)[source]

Bases: Node

Create job name for parameters.

Inputs:

base (str): The stem for the final name. (Default is “job_”.) float (float): The parameter value to add to the name.

Outputs:

job_name (str): The base plus float sanitized into a valid job name.

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
title = 'JobName'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

class ironflow.nodes.pyiron.atomistics_nodes.Lammps_Node(params)[source]

Bases: Node

WIP.

color = '#5d95de'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>, <ryvencore.NodePortBP.NodeOutputBP object>]
property representations: dict
title = 'Lammps'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.Linspace_Node(params)[source]

Bases: Node

Generate a linear mesh in a given range using np.linspace.

Inputs:

min (int): The lower bound (inclusive). (Default is 1.) max (int): The upper bound (inclusive). (Default is 2.) steps (int): How many samples to take inside (min, max). (Default is 10.)

Outputs:

linspace (numpy.ndarray): A uniform sampling over the requested range.

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
place_event()[source]

place_event() is called once the node object has been fully initialized and placed in the flow. When loading content, place_event() is executed before the connections are built, which is important for nodes that need to update once and, during this process, set output data values, to prevent later connected (potentially sequential) nodes from receiving false updates because of that. Notice that this method gets executed every time the node is added to the flow, which can happen multiple times for the same object, for example due to undo/redo operations. Also note that GUI content is usually not accessible yet from here, for that use view_place_event().

title = 'Linspace'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

class ironflow.nodes.pyiron.atomistics_nodes.Matplot_Node(params)[source]

Bases: Node

A 2D matplotlib plot.

Inputs:

x (list|numpy.ndarray|…): Data for the x-axis. y (list|numpy.ndarray|…): Data for the y-axis.

Outputs:

fig (matplotlib.figure.Figure): The resulting figure after a matplotlib.pyplot.plot call on x and y.

color = '#5d95de'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
title = 'MatPlot'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.OutputsOnlyAtoms(params)[source]

Bases: Node, ABC

A helper class that manages representations for nodes whose only output is a pyiron_atomistics.Atoms object.

Outputs:

structure (pyiron_atomistics.Atoms): An atomic structure.

color = '#aabb44'
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
property representations: dict
abstract update_event(inp=-1)[source]

Must set output 0 to an instance of pyiron_atomistics.atomistics.atoms.Atoms

class ironflow.nodes.pyiron.atomistics_nodes.Plot3d_Node(params)[source]

Bases: Node

Plot a structure with NGLView.

Inputs:

structure (pyiron_atomistics.Atoms): The structure to plot.

Outputs:

plot3d (nglview.widget.NGLWidget): The plot object. structure (pyiron_atomistics.Atoms): The raw structure object passed in.

color = '#5d95de'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>, <ryvencore.NodePortBP.NodeOutputBP object>]
title = 'Plot3d'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
class ironflow.nodes.pyiron.atomistics_nodes.Project_Node(params)[source]

Bases: Node

Create a pyiron project.

Inputs:

name (str): The name of the project. Will access existing project data under that name. (Default is “.”.)

Outputs:

project (pyiron_atomistics.Project): The project object.

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
place_event()[source]

place_event() is called once the node object has been fully initialized and placed in the flow. When loading content, place_event() is executed before the connections are built, which is important for nodes that need to update once and, during this process, set output data values, to prevent later connected (potentially sequential) nodes from receiving false updates because of that. Notice that this method gets executed every time the node is added to the flow, which can happen multiple times for the same object, for example due to undo/redo operations. Also note that GUI content is usually not accessible yet from here, for that use view_place_event().

property representations: dict
title = 'Project'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

class ironflow.nodes.pyiron.atomistics_nodes.Repeat_Node(params)[source]

Bases: OutputsOnlyAtoms

Repeat atomic structure supercell.

Inputs:

structure (pyiron_atomistics.Atoms): The structure to repeat periodically. all (int): The number of times to repeat it in each of the three bravais lattice directions.

Outputs:

structure (pyiron_atomistics.Atoms): A repeated copy of the input structure.

init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>, <ryvencore.NodePortBP.NodeInputBP object>]
title = 'Repeat'
update_event(inp=-1)[source]

Must set output 0 to an instance of pyiron_atomistics.atomistics.atoms.Atoms

class ironflow.nodes.pyiron.atomistics_nodes.Result_Node(params)[source]

Bases: Node

Simply shows a value converted to str

color = '#c69a15'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>]
place_event()[source]

place_event() is called once the node object has been fully initialized and placed in the flow. When loading content, place_event() is executed before the connections are built, which is important for nodes that need to update once and, during this process, set output data values, to prevent later connected (potentially sequential) nodes from receiving false updates because of that. Notice that this method gets executed every time the node is added to the flow, which can happen multiple times for the same object, for example due to undo/redo operations. Also note that GUI content is usually not accessible yet from here, for that use view_place_event().

title = 'Result'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'
view_place_event()[source]

Called once all GUI for the node has been created by the frontend, if one exists. Any initial communication to widgets is supposed to happen here, and this method is not called when running without gui.

class ironflow.nodes.pyiron.atomistics_nodes.Sin_Node(params)[source]

Bases: Node

Call numpy.sin on a value.

Inputs:

x (int|float|list|numpy.ndarray|…): The value to sine transform.

Outputs:

sin (float|numpy.ndarray): The sine of x.

color = '#5d95de'
init_inputs: List[NodeInputBP] = [<ryvencore.NodePortBP.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ryvencore.NodePortBP.NodeOutputBP object>]
title = 'Sin'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

version: str = 'v0.1'