Skip to content

Commit

Permalink
Merge pull request #4 from kmlefran/docs
Browse files Browse the repository at this point in the history
Expand documentation significantly
  • Loading branch information
kmlefran authored Jul 31, 2024
2 parents 042b488 + 24839aa commit 5942da2
Show file tree
Hide file tree
Showing 21 changed files with 5,656 additions and 193 deletions.
100 changes: 0 additions & 100 deletions docs/source/reference/api/auto/aiida_aimall/calculations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Classes
.. autoapisummary::

aiida_aimall.calculations.AimqbCalculation
aiida_aimall.calculations.GaussianWFXCalculation



Expand Down Expand Up @@ -137,102 +136,3 @@ Attributes
:param folder: an `aiida.common.folders.Folder` where the plugin should temporarily
place all files needed by the calculation.
:return: `aiida.common.datastructures.CalcInfo` instance



.. py:class:: GaussianWFXCalculation(*args, **kwargs)
Bases: :py:obj:`aiida.engine.CalcJob`

AiiDA calculation plugin wrapping Gaussian. Adapted from aiida-gaussian
https://github.com/nanotech-empa/aiida-gaussian, Copyright (c) 2020 Kristjan Eimre.
Additions made to enable providing molecule input as orm.Str,
and wfx files are retrieved by default. We further define another input wfxgroup in which you can provide an
optional group to store the wfx file in and fragment_label as an optional extra to add on the output.

Args:
structure: StructureData for molecule to be run. Do not provide structure AND structure_str, but provide
at least one
structure_str: Str for molecule to be run. e.g. orm.Str(H 0.0 0.0 0.0
H -1.0 0.0 0.0)
Do not provide structure AND structure_str, but provide at least one
wfxgroup: Str of a group to add the .wfx files to
parameters: required: Dict of Gaussian parameters, same as from aiida-gaussian. Note that the options provided should
generate a wfx file. See Example
settings: optional, additional input parameters
fragment_label: Str, optional: an extra to add to the wfx file node. Involved in the controllers,
which check extras
parent_calc_folder: RemoteData, optional: the folder of a completed gaussian calculation

Example:
::

builder = GaussianCalculation.get_builder()
builder.structure_str = orm.Str("H 0.0 0.0 0.0 -1.0 0.0 0.0") # needs newline but docs doesn't like
builder.parameters = orm.Dict(dict={
'link0_parameters': {
'%chk':'aiida.chk',
"%mem": "3200MB", # Currently set to use 8000 MB in .sh files
"%nprocshared": 4,
},
'functional':'wb97xd',
'basis_set':'aug-cc-pvtz',
'charge': 0,
'multiplicity': 1,
'route_parameters': {'opt': None, 'Output':'WFX'},
"input_parameters": {"output.wfx": None},
})
builder.code = orm.load_code("g16@localhost")
builder.metadata.options.resources = {"num_machines": 1, "tot_num_mpiprocs": 4}
builder.metadata.options.max_memory_kb = int(6400 * 1.25) * 1024
builder.metadata.options.max_wallclock_seconds = 604800
submit(builder)



.. py:attribute:: INPUT_FILE
:value: 'aiida.inp'



.. py:attribute:: OUTPUT_FILE
:value: 'aiida.out'



.. py:attribute:: PARENT_FOLDER_NAME
:value: 'parent_calc'



.. py:attribute:: DEFAULT_PARSER
:value: 'aimall.gaussianwfx'



.. py:method:: define(spec)
:classmethod:

Define the process specification, including its inputs, outputs and known exit codes.

Ports are added to the `metadata` input namespace (inherited from the base Process),
and a `code` input Port, a `remote_folder` output Port and retrieved folder output Port
are added.

:param spec: the calculation job process spec to define.


.. py:method:: prepare_for_submission(folder)
This is the routine to be called when you want to create
the input files and related stuff with a plugin.

:param folder: a aiida.common.folders.Folder subclass where
the plugin should put all its files.


.. py:method:: _render_input_string_from_params(parameters, structure_string)
:classmethod:

Generate the Gaussian input file using pymatgen.
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ Attributes


.. py:attribute:: CALCULATION_ENTRY_POINT
:value: 'aimall.gaussianwfx'
:value: 'gaussian'



Expand Down
35 changes: 0 additions & 35 deletions docs/source/reference/api/auto/aiida_aimall/parsers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Classes
.. autoapisummary::

aiida_aimall.parsers.AimqbBaseParser
aiida_aimall.parsers.GaussianWFXParser
aiida_aimall.parsers.AimqbGroupParser


Expand Down Expand Up @@ -90,40 +89,6 @@ Attributes
.. py:class:: GaussianWFXParser(node: aiida.orm.CalcJobNode)
Bases: :py:obj:`aiida.parsers.parser.Parser`

Basic AiiDA parser for the output of Gaussian

Parses default cclib output as 'output_parameters' node and separates final SCF
energy as 'energy_ev' and output structure as 'output_structure' (if applicable)

Adapted from aiida-gaussian https://github.com/nanotech-empa/aiida-gaussian, Copyright (c) 2020 Kristjan Eimre.


.. py:method:: parse(**kwargs)
Receives in input a dictionary of retrieved nodes. Does all the logic here.


.. py:method:: _parse_log(log_file_string, inputs)
.. py:method:: _parse_electron_numbers(log_file_string)
.. py:method:: _parse_log_cclib(log_file_string)
.. py:method:: _set_output_structure(inputs, property_dict)
.. py:method:: _final_checks_on_log(log_file_string, property_dict, inputs)
.. py:class:: AimqbGroupParser(node)
Expand Down
Loading

0 comments on commit 5942da2

Please sign in to comment.