aiidalab_dlpoly package¶
Application¶
Defines the main AiiDAlab application page.
- class aiidalab_dlpoly.main.MainApp¶
Bases:
objectThe main AiiDAlab application class.
- class aiidalab_dlpoly.main.MainAppView(*args: Any, **kwargs: Any)¶
Bases:
VBoxThe main app view.
Module for handling the top-level application model and AiiDA processes.
- class aiidalab_dlpoly.process.DLPOLYProcess(model: MainAppModel)¶
Bases:
objectClass to handle a DL_POLY AiiDA process.
- submit_process() None¶
Submit the AiiDA process.
- classmethod validate_model(model: MainAppModel) bool¶
Validate the main application model.
- Parameters:
model (MainAppModel) – The main application model to validate.
- Returns:
True if the model is valid, False otherwise.
- Return type:
bool
- class aiidalab_dlpoly.process.MainAppModel(*args: Any, **kwargs: Any)¶
Bases:
HasTraitsThe main AiiDAlab application MVC model.
Aggregates the per-step models used across the configuration wizard and handles submission of the resulting DL_POLY process to AiiDA.
- block_results = True¶
- reset() None¶
Reset the state of the model.
Contains utility functions used throughout the python package.
- aiidalab_dlpoly.utils.open_link_in_new_tab(path: str, _=None) None¶
Open a given link in a new browser tab.
- Parameters:
path (str) – The link to be opened.
- aiidalab_dlpoly.utils.test_aiida_dlpoly_import() bool¶
Test if the aiida-dlpoly plugin is installed.
- Returns:
True if the aiida-dlpoly plugin is installed, False otherwise.
- Return type:
bool
Models¶
The structure input model for DL_POLY input configuration.
- class aiidalab_dlpoly.models.structure.StructureInputModel(*args: Any, **kwargs: Any)¶
Bases:
HasTraitsModel for structure selection and manipulation.
A model to define and store required information from the structure step in the app’s configuration wizard.
- 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 is_periodic: bool¶
True if the attached StructureData object is a periodic structure.
The workflow input model for DL_POLY input configuration.
- class aiidalab_dlpoly.models.workflow.WorkflowInputModel(*args: Any, **kwargs: Any)¶
Bases:
HasTraitsModel for the DL_POLY workflow configuration step.
Stores the force field definition and the simulation control input. The control input can be supplied either as a pre-formatted DL_POLY
CONTROLfile or, whenuse_detailed_controlis set, as a set of key control parameters that are assembled into a control dictionary for theaiida-dlpolyplugin.- CONTROL_UNITS = {'cutoff': 'ang', 'ensemble_thermostat_coupling': 'ps', 'padding': 'ang', 'stats_frequency': 'steps', 'temperature': 'K', 'time_equilibration': 'steps', 'time_run': 'steps', 'timestep': 'ps'}¶
- DPD_ORDERS = (0, 1, 2)¶
- ENSEMBLES = ('NVE', 'NVT', 'NPT', 'NST', 'PMF')¶
- ENSEMBLE_METHODS = {'NPT': ('Langevin', 'Berendsen', 'Hoover', 'MTK'), 'NST': ('Langevin', 'Berendsen', 'Hoover', 'MTK'), 'NVT': ('Evans', 'Langevin', 'Anderson', 'Berendsen', 'Hoover', 'gentle', 'ttm', 'dpd')}¶
- property available_ensemble_methods: tuple¶
The ensemble methods valid for the currently selected ensemble.
Returns an empty tuple for ensembles (NVE, PMF) that do not take a method.
- property control_parameters: dict¶
Return the detailed control parameters as a control dictionary.
The format matches the control dictionary consumed by the
aiida-dlpolyplugin, where every numeric input is a(value, unit)pair. The ensemble parameters are added as plain values, withensemble_methodonly included when the ensemble requires one andensemble_dpd_orderonly when the method isdpd.
- property has_control_file: bool¶
True if a control file has been attached to the model.
- property has_force_field: bool¶
True if a force field file has been attached to the model.
- property has_valid_ensemble: bool¶
True if the ensemble configuration is complete and self-consistent.
The ensemble must be a recognised type; when it requires a method the method must be one of the valid options for that ensemble; and when the method is
dpda valid DPD order must be selected.
- property is_valid: bool¶
True if the model holds a complete, submittable configuration.
A force field is always required. When detailed control is disabled a control file must be supplied; when enabled a valid ensemble configuration is required.
- property requires_dpd_order: bool¶
True if the selected ensemble method requires a DPD order.
- property requires_ensemble_method: bool¶
True if the selected ensemble requires an ensemble method.
- property requires_thermostat_coupling: bool¶
True if the ensemble requires a thermostat coupling time.
Applies to the NVT/NPT/NST ensembles, except when the DPD method is selected (which uses the DPD order instead).
Defines the MVC model for computational resource configuration for AiiDA.
- class aiidalab_dlpoly.models.resources.ComputationalResourcesModel(*args: Any, **kwargs: Any)¶
Bases:
HasTraitsModel for the resource setup stage.
- default_guide = '\n <p>\n Configure the computational resources required to run the DL_POLY\n calculation. Additionally, you can provide a label and description for\n the AiiDA process that will be created.\n </p>\n '¶
- validate() bool¶
Validate the model’s inputs.
- Returns:
True if all inputs are valid, False otherwise.
- Return type:
bool
Defines the MVC model for a full DL_POLY process.
- class aiidalab_dlpoly.models.process.ProcessModel(*args: Any, **kwargs: Any)¶
Bases:
HasTraitsModel 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 the process.
- property process: ProcessNode | None¶
Return the process node for the stored uuid.
- process_uuid = None¶
Defines the MVC model for holding DL_POLY results information.
- class aiidalab_dlpoly.models.results.ResultsModel(*args: Any, **kwargs: Any)¶
Bases:
ProcessModelMVC results step model.
- blocked = True¶
Wizard steps¶
Defines the wizard widget for the main AiiDAlab DL_POLY application.
- class aiidalab_dlpoly.wizards.main_app.MainAppWizardWidget(*args: Any, **kwargs: Any)¶
Bases:
VBoxAn ipywidgets based widget to hold the main application configuration wizard.
- on_step_change(change)¶
Switch between wizard steps when selected by the user.
- property steps¶
Alias to the wizard’s steps list.
Defines the model and view components for the structure setup stage.
- class aiidalab_dlpoly.wizards.structure.StructureWizardStep(*args: Any, **kwargs: Any)¶
Bases:
VBox,WizardAppWidgetStepWizard for structure selection and manipulation.
A step in a wizard based process widget which allows a user to configure a chemical structure to be used in their workflow.
- render()¶
Render the wizard’s contents if not already rendered.
- submit_structure(_)¶
Submit the structure step.
Defines the model and view components for the workflow setup stage.
- class aiidalab_dlpoly.wizards.workflow.WorkflowWizardStep(*args: Any, **kwargs: Any)¶
Bases:
VBox,WizardAppWidgetStepWizard step for configuring the DL_POLY workflow.
Provides a required force field file upload and a control input which can either be a pre-formatted DL_POLY
CONTROLfile or, when the detailed control checkbox is ticked, a set of key control parameters.- CONTROL_FIELDS = (('temperature', 'Temperature', 'K', False), ('timestep', 'Timestep', 'ps', False), ('time_run', 'Run time', 'steps', True), ('time_equilibration', 'Equilibration time', 'steps', True), ('cutoff', 'Cutoff', 'ang', False), ('padding', 'Padding', 'ang', False), ('stats_frequency', 'Stats frequency', 'steps', True))¶
- render()¶
Render the wizard’s contents if not already rendered.
- submit_workflow(_)¶
Submit the workflow step.
Defines the model and view for the resource setup stage.
- class aiidalab_dlpoly.wizards.resources.ComputationalResourcesWizardStep(*args: Any, **kwargs: Any)¶
Bases:
VBox,WizardAppWidgetStepMain view for the resource setup stage.
- render()¶
Render the wizard’s contents if not already rendered.
- class aiidalab_dlpoly.wizards.resources.ResourceSetupBox(*args: Any, **kwargs: Any)¶
Bases:
VBoxA box widget for defining computational resources.
- update_codes(_=None) None¶
Update the list of available codes.
Module for defining widgets/models for viewing process progress and results.