aiidalab_chemshell.models package

Submodules

aiidalab_chemshell.models.process module

Defines the MVC model for a full ChemShell process.

class aiidalab_chemshell.models.process.ProcessModel(*args: t.Any, **kwargs: t.Any)

Bases: HasTraits

Model describing an AiiDA process.

property has_process: bool

Return true if a valid process node is associated with the uuid.

property inputs: NodeLinksManager | list

Return the inputs for the process.

property outputs: NodeLinksManager | list

Return the outputs for teh process.

property process: ProcessNode | None

Return the process node for the stored uuid.

process_uuid

A trait for unicode strings.

aiidalab_chemshell.models.resources module

Defines the MVC model for computational resource configuration for AiiDA.

class aiidalab_chemshell.models.resources.ComputationalResourcesModel(*args: t.Any, **kwargs: t.Any)

Bases: HasTraits

Model for the resource setup stage.

code_label

A trait for unicode strings.

default_guide = '\n        <p>\n            Configure the computational resources required to run the ChemShell\n            calculation. Additionally, you can provide a label and description for\n            the AiiDA process that will be created.\n        </p>\n    '
ncpus

An int trait.

process_description

A trait for unicode strings.

process_label

A trait for unicode strings.

submitted

A boolean (True, False) trait.

validate() bool

Validate the model’s inputs.

Returns:

True if all inputs are valid, False otherwise.

Return type:

bool

aiidalab_chemshell.models.results module

Defines the MVC model for holding ChemShell results information.

class aiidalab_chemshell.models.results.ResultsModel(*args: t.Any, **kwargs: t.Any)

Bases: ProcessModel

MVC results step model.

blocked

A boolean (True, False) trait.

aiidalab_chemshell.models.structure module

The structure input model for ChemShell input configuration.

class aiidalab_chemshell.models.structure.StructureInputModel(*args: t.Any, **kwargs: t.Any)

Bases: HasTraits

Model for structure selection and manipulation.

property has_file: bool

True if a raw structure file object has been attached to the model.

property has_structure: bool

True if a StructureData object has been attached to the model.

property has_trajectory: bool

True if a TrajectoryData object has been attached to the model.

property is_periodic: bool

True if the attached StructureData object is a periodic structure.

structure

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

structure_file

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

submitted

A boolean (True, False) trait.

trajectory

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

aiidalab_chemshell.models.workflow module

Defines the MVC models for ChemShell workflow specification.

class aiidalab_chemshell.models.workflow.ChemShellWorkflowModel(*args: t.Any, **kwargs: t.Any)

Bases: HasTraits

The model for setting up a ChemShell workflow.

basis_quality

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
basis_set

A trait for unicode strings.

default_guide = ''
force_field

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

functional

A trait for unicode strings.

gradients

A boolean (True, False) trait.

hessian

A boolean (True, False) trait.

mm_theory

A trait for unicode strings.

qm_region

A trait for unicode strings.

qm_theory

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
structure_2 = <aiidalab_chemshell.models.structure.StructureInputModel object>
submitted

A boolean (True, False) trait.

use_dft

A boolean (True, False) trait.

use_mm

A boolean (True, False) trait.

vibrational_analysis

A boolean (True, False) trait.

workflow

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green

Module contents

Module defining the various MVS models used in the UI interface.