Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #8

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ A plugin to interface AIMAll with AiiDA
* [`docs/`](docs/): Source code of documentation for [Read the Docs](http://aiida-diff.readthedocs.io/en/latest/)
* [`examples/`](examples/): An example of how to link the four controllers in an overall workflow
* [`tests/`](tests/): Basic regression tests using the [pytest](https://docs.pytest.org/en/latest/) framework (submitting a calculation, ...). Install `pip install -e .[testing]` and run `pytest`.
* [`conftest.py`](conftest.py): Configuration of fixtures for [pytest](https://docs.pytest.org/en/latest/)
* [`conftest.py`](PythonPackages/aiida-aimall/tests/conftest.py): Configuration of fixtures for [pytest](https://docs.pytest.org/en/latest/)
* [`.gitignore`](.gitignore): Telling git which files to ignore
* [`.pre-commit-config.yaml`](.pre-commit-config.yaml): Configuration of [pre-commit hooks](https://pre-commit.com/) that sanitize coding style and check for syntax errors. Enable via `pip install -e .[pre-commit] && pre-commit install`
* [`.readthedocs.yml`](.readthedocs.yml): Configuration of documentation build for [Read the Docs](https://readthedocs.org/)
* [`.isort.cfg`](.isort.cfg): Configuration to make isort and black precommit actions compatible
* [`LICENSE`](LICENSE): License for your plugin
* [`README.md`](README.md): This file
* [`LICENSE`](PythonPackages/aiida-aimall/LICENSE): License for your plugin
* [`README.md`](PythonPackages/aiida-aimall/README.md): This file
* [`pyproject.toml`](setup.json): Python package metadata for registration on [PyPI](https://pypi.org/) and the [AiiDA plugin registry](https://aiidateam.github.io/aiida-registry/) (including entry points)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
.. autoapi-nested-parse::

Calculations provided by aiida_aimall.

Upon pip install, AimqbCalculation is accessible in AiiDA.calculations plugins
Using the 'aimall' entry point, and GaussianWFXCalculation is accessible with the 'gaussianwfx'
entry point
`CalcJob` implementation for the aimqb executable of AIMAll.



Expand Down
58 changes: 32 additions & 26 deletions docs/source/reference/api/auto/aiida_aimall/controllers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

.. autoapi-nested-parse::

aiida_aimall.controllers
Subclasses of `FromGroupSubmissionController` designed to prevent too many running processes

Subclasses of FromGroupSubmissionController designed to manage local traffic on lab Macs to prevent to many running processes
The entire :func:`aiida_aimall.workchains.subparam.SubstituentParameterWorkChain` can be replicated
by linking these together.

Provides controllers for the AimReor WorkChain, AimQBCalculations, and GaussianWFXCalculations
Provides controllers for the `AimReorWorkChain`, `AimqbCalculations`, `GaussianCalculation`
and `SmilesToGaussianWorkChain`.



Expand Down Expand Up @@ -51,18 +53,18 @@ Attributes



.. py:class:: SmilesToGaussianController(code_label: str, g16_opt_params: dict, wfxgroup: str, nprocs: int, mem_mb: int, time_s: int, *args, **kwargs)
.. py:class:: SmilesToGaussianController(code_label: str, gauss_opt_params: dict, wfxgroup: str, nprocs: int, mem_mb: int, time_s: int, *args, **kwargs)


Bases: :py:obj:`aiida_submission_controller.FromGroupSubmissionController`

A controller for submitting SmilesToGaussianWorkchain
A controller for submitting :func:`aiida_aimall.workchains.param_parts.SmilesToGaussianWorkChain`

:param parent_group_label: the string of a group label which contains various SMILES as orm.Str nodes
:param group_label: the string of the group to put the GaussianCalculations in
:param max_concurrent: maximum number of concurrent processes.
:param code_label: label of code, e.g. gaussian@cedar
:param g16_opt_params: Dict of Gaussian parameters to use
:param gauss_opt_params: Dict of Gaussian parameters to use
:param wfxgroup: group in which to store the resulting wfx files
:param nprocs: number of processors for gaussian calculation
:param mem_mb: amount of memory in MB for Gaussian calculation
Expand All @@ -83,8 +85,8 @@ Attributes
parent_group_label = 'input_smiles', # Add structures to run to input_smiles group
group_label = 'gaussianopt', # Resulting nodes will be in the gaussianopt group
max_concurrent = 1,
wfxgroup = "opt_wfx"
g16_opt_params = Dict(dict={
wfxgroup = "opt_wfx",
gauss_opt_params = Dict(dict={
'link0_parameters': {
'%chk':'aiida.chk',
"%mem": "4000MB",
Expand All @@ -93,8 +95,11 @@ Attributes
'functional':'wb97xd',
'basis_set':'aug-cc-pvtz',
'route_parameters': { 'opt':None, 'freq':None},
})
)
}),
nprocs = 4,
mem_mb = 6400,
time_s = 24*3600*7
)

while True:
#submit Gaussian batches every hour
Expand All @@ -121,7 +126,7 @@ Attributes



.. py:attribute:: g16_opt_params
.. py:attribute:: gauss_opt_params
:type: dict


Expand All @@ -147,7 +152,7 @@ Attributes


.. py:attribute:: WORKFLOW_ENTRY_POINT
:value: 'aimall.smitog16'
:value: 'aimall.smitogauss'



Expand All @@ -158,7 +163,7 @@ Attributes

.. py:method:: get_inputs_and_processclass_from_extras(extras_values)

Constructs input for a GaussianWFXCalculation from extra_values
Constructs input for a GaussianCalculation from extra_values



Expand All @@ -167,7 +172,7 @@ Attributes

Bases: :py:obj:`aiida_submission_controller.FromGroupSubmissionController`

A controller for submitting AIMReor Workchains.
A controller for submitting :func:`aiida_aimall.workchains.param_parts.AIMAllReorWorkChain`.

:param parent_group_label: the string of a group label which contains various structures as orm.Str nodes
:param group_label: the string of the group to put the GaussianCalculations in
Expand All @@ -180,8 +185,8 @@ Attributes

.. note::

A typical use case is using this as a controller on wfx files created by GaussianWFXCalculation. In that case,
match the `parent_group_label` here to the `wfxgroup` provided to the GaussianWFXCalculation.
A typical use case is using this as a controller on wfx files created by GaussianCalculation. In that case,
match the `parent_group_label` here to the `wfxgroup` provided to the GaussianCalculation.
In GaussianOptWorkchain, this is `opt_wfx` by default

.. rubric:: Example
Expand Down Expand Up @@ -249,7 +254,7 @@ Attributes

.. py:method:: get_inputs_and_processclass_from_extras(extras_values)

Constructs input for a AimReor Workchain from extra_values
Constructs input for a :func:`aiida_aimall.workchains.param_parts.AIMAllReorWorkChain` from extra_values



Expand All @@ -258,21 +263,22 @@ Attributes

Bases: :py:obj:`aiida_submission_controller.FromGroupSubmissionController`

A controller for submitting AimQB calculations.
A controller for submitting :func:`aiida_aimall.calculations.AimqbCalculation`.

:param parent_group_label: the string of a group label which contains various structures as orm.Str nodes
:param group_label: the string of the group to put the GaussianCalculations in
:param max_concurrent: maximum number of concurrent processes. Expected behaviour is to set to a large number
since we will be submitting to Cedar which will manage
:param code_label: label of code, e.g. gaussian@cedar
:param aimparameters: dict of parameters for running AimQB, to be converted to AimqbParameters by the controller
:param aimparameters: dict of parameters for running AimQB, to be converted to
:func:`aiida_aimall.data.AimqbParameters` by the controller

:returns: Controller object, periodically use run_in_batches to submit new results

.. note::

A typical use case is using this as a controller on wfx files created by GaussianWFXCalculation. In that case,
match the `parent_group_label` here to the `wfxgroup` provided to the GaussianWFXCalculation.
A typical use case is using this as a controller on wfx files created by `GaussianCalculation`. In that case,
match the `parent_group_label` here to the `wfxgroup` provided to the `GaussianCalculation`.
In GaussianSubmissionController, this is `reor_wfx`

.. rubric:: Example
Expand Down Expand Up @@ -344,19 +350,19 @@ Attributes



.. py:class:: GaussianSubmissionController(code_label: str, g16_sp_params: dict, wfxgroup: str, *args, **kwargs)
.. py:class:: GaussianSubmissionController(code_label: str, gauss_sp_params: dict, wfxgroup: str, *args, **kwargs)


Bases: :py:obj:`aiida_submission_controller.FromGroupSubmissionController`

A controller for submitting Gaussian calculations.
A controller for submitting `GaussianCalculation`.

:param parent_group_label: the string of a group label which contains various structures as orm.Str nodes
:param group_label: the string of the group to put the GaussianCalculations in
:param max_concurrent: maximum number of concurrent processes. Expected behaviour is to set to a large number
since we will be submitting to Cedar which will manage
:param code_label: label of code, e.g. gaussian@cedar
:param g16_sp_params: dictionary of parameters to use in gaussian calculation
:param gauss_sp_params: dictionary of parameters to use in gaussian calculation

:returns: Controller object, periodically use run_in_batches to submit new results

Expand All @@ -383,7 +389,7 @@ Attributes
parent_group_label = 'struct', # Add structures to run to struct group
group_label = 'gaussiansp', # Resulting nodes will be in the gaussiansp group
max_concurrent = 1,
g16_sp_params = Dict(dict={
gauss_sp_params = Dict(dict={
'link0_parameters': {
'%chk':'aiida.chk',
"%mem": "4000MB",
Expand Down Expand Up @@ -423,7 +429,7 @@ Attributes



.. py:attribute:: g16_sp_params
.. py:attribute:: gauss_sp_params
:type: dict


Expand Down
7 changes: 2 additions & 5 deletions docs/source/reference/api/auto/aiida_aimall/data/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@

Data types provided by plugin

Upon pip install, AimqbParameters is accessible in AiiDA.data plugins
Using the 'aimall' entry point



Package Contents
----------------
Module Contents
---------------

Classes
~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions docs/source/reference/api/auto/aiida_aimall/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Subpackages
:titlesonly:
:maxdepth: 3

data/index.rst
workchains/index.rst


Submodules
Expand All @@ -28,8 +28,8 @@ Submodules

calculations/index.rst
controllers/index.rst
data/index.rst
parsers/index.rst
workchains/index.rst


Package Contents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Parsers provided by aiida_aimall.

Register parsers via the "aiida.parsers" entry point in setup.json.
Register parsers via the "aiida.parsers" entry point in pyproject.toml.



Expand Down
Loading