diff --git a/docs/source/reference/api/auto/aiida_aimall/calculations/index.rst b/docs/source/reference/api/auto/aiida_aimall/calculations/index.rst index 070109e..b3cc1b9 100644 --- a/docs/source/reference/api/auto/aiida_aimall/calculations/index.rst +++ b/docs/source/reference/api/auto/aiida_aimall/calculations/index.rst @@ -22,7 +22,6 @@ Classes .. autoapisummary:: aiida_aimall.calculations.AimqbCalculation - aiida_aimall.calculations.GaussianWFXCalculation @@ -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. diff --git a/docs/source/reference/api/auto/aiida_aimall/controllers/index.rst b/docs/source/reference/api/auto/aiida_aimall/controllers/index.rst index 39986c6..2c04627 100644 --- a/docs/source/reference/api/auto/aiida_aimall/controllers/index.rst +++ b/docs/source/reference/api/auto/aiida_aimall/controllers/index.rst @@ -434,7 +434,7 @@ Attributes .. py:attribute:: CALCULATION_ENTRY_POINT - :value: 'aimall.gaussianwfx' + :value: 'gaussian' diff --git a/docs/source/reference/api/auto/aiida_aimall/parsers/index.rst b/docs/source/reference/api/auto/aiida_aimall/parsers/index.rst index 1103f25..2f8f63c 100644 --- a/docs/source/reference/api/auto/aiida_aimall/parsers/index.rst +++ b/docs/source/reference/api/auto/aiida_aimall/parsers/index.rst @@ -20,7 +20,6 @@ Classes .. autoapisummary:: aiida_aimall.parsers.AimqbBaseParser - aiida_aimall.parsers.GaussianWFXParser aiida_aimall.parsers.AimqbGroupParser @@ -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) diff --git a/docs/source/reference/api/auto/aiida_aimall/workchains/index.rst b/docs/source/reference/api/auto/aiida_aimall/workchains/index.rst index 9b422b7..963374a 100644 --- a/docs/source/reference/api/auto/aiida_aimall/workchains/index.rst +++ b/docs/source/reference/api/auto/aiida_aimall/workchains/index.rst @@ -26,8 +26,10 @@ Classes .. autoapisummary:: aiida_aimall.workchains.QMToAIMWorkchain + aiida_aimall.workchains.GenerateWFXToAIMWorkchain aiida_aimall.workchains.SmilesToGaussianWorkchain aiida_aimall.workchains.AIMAllReor + aiida_aimall.workchains.GaussianToAIMWorkChain aiida_aimall.workchains.SubstituentParameterWorkChain @@ -38,15 +40,20 @@ Functions .. autoapisummary:: aiida_aimall.workchains.generate_rotated_structure_aiida + aiida_aimall.workchains.remove aiida_aimall.workchains.dict_to_structure aiida_aimall.workchains.calc_multiplicity aiida_aimall.workchains.find_attachment_atoms aiida_aimall.workchains.reorder_molecule aiida_aimall.workchains.get_xyz aiida_aimall.workchains.get_substituent_input + aiida_aimall.workchains.generate_structure_data aiida_aimall.workchains.parameters_with_cm + aiida_aimall.workchains.get_wfxname_from_gaussianinputs + aiida_aimall.workchains.create_wfx_from_retrieved aiida_aimall.workchains.validate_shell_code aiida_aimall.workchains.validate_file_ext + aiida_aimall.workchains.get_wfx @@ -59,8 +66,6 @@ Attributes aiida_aimall.workchains.GaussianCalculation aiida_aimall.workchains.AimqbParameters aiida_aimall.workchains.AimqbCalculation - aiida_aimall.workchains.DictData - aiida_aimall.workchains.PDData .. py:data:: old_stdout @@ -79,14 +84,6 @@ Attributes -.. py:data:: DictData - - - -.. py:data:: PDData - - - .. py:function:: generate_rotated_structure_aiida(FolderData, atom_dict, cc_dict) Rotates the fragment to the defined coordinate system @@ -96,6 +93,11 @@ Attributes :param cc_dict: AIM cc_dict +.. py:function:: remove(in_list) + + Remove digits from a list of strings. e.g. ['O1','H2','H3'] -> ['O','H','H'] + + .. py:function:: dict_to_structure(fragment_dict) Generate a string of xyz coordinates for Gaussian input file @@ -145,11 +147,26 @@ Attributes :returns: Dict with keys xyz, charge, multiplicity +.. py:function:: generate_structure_data(smiles_dict) + + Take an input xyz string and convert it to StructureData + + .. py:function:: parameters_with_cm(parameters, smiles_dict) Add charge and multiplicity keys to Gaussian Input +.. py:function:: get_wfxname_from_gaussianinputs(gaussian_parameters) + + Look for wfx or wfn objects in the retrieved Folder + + +.. py:function:: create_wfx_from_retrieved(wfxname, retrieved_folder) + + Create wavefunciton Singlefildata from retrieved folder + + .. py:function:: validate_shell_code(node, _) Validate the shell code, ensuring that it is ShellCode or Str @@ -192,6 +209,47 @@ Attributes +.. py:class:: GenerateWFXToAIMWorkchain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True) + + + Bases: :py:obj:`aiida.engine.WorkChain` + + Workchain to generate a wfx file from computational chemistry output files and submit that to an AIMQB Calculation + + .. note:: + + This workchain uses the IOData module of the Ayer's group Horton to generate the wfx files. Supported file formats include + .fchk files, molden files (from Molpro, Orca, PSI4, Turbomole, and Molden), and CP2K atom log files. Further note that .fchk files + can simply be provided directly to an `AimqbCalculation`. + + While IOData accepts other file formats, these formats are the ones available that contain the necessary information to generate + wfc files + + .. py:method:: define(spec) + :classmethod: + + Define the specification of the process, including its inputs, outputs and known exit codes. + + A `metadata` input namespace is defined, with optional ports that are not stored in the database. + + + + .. py:method:: generate_wfx() + + Given SinglefileData generates a wfx file if IOData is capable + + + .. py:method:: aim() + + Run AIM on the generated wfx file + + + .. py:method:: result() + + Put results in output node + + + .. py:class:: SmilesToGaussianWorkchain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True) @@ -218,11 +276,31 @@ Attributes Update provided Gaussian parameters with charge and multiplicity of substituent + .. py:method:: string_to_StructureData() + + Convert an xyz string of molecule geometry to StructureData + + + .. py:method:: get_wfx_name() + + Find the wavefunction file in the retrieved node + + .. py:method:: submit_gaussian() Submits the gaussian calculation + .. py:method:: found_wfx_name() + + Check if we found a wfx or wfn file + + + .. py:method:: create_wfx_file() + + Create a wavefunction file from the retireved folder + + .. py:method:: results() Store our relevant information as output @@ -268,6 +346,45 @@ Attributes +.. py:function:: get_wfx(retrieved_folder, wfx_filename) + + Get a wfx file from retrieved folder + + +.. py:class:: GaussianToAIMWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True) + + + Bases: :py:obj:`aiida.engine.WorkChain` + + A workchain to submit a Gaussian calculation and automatically setup an AIMAll calculation on the output + + .. py:method:: define(spec) + :classmethod: + + Define workchain steps + + + .. py:method:: g16() + + Run Gaussian calculation + + + .. py:method:: classify_wfx() + + Add the wavefunction file from the previous step to the correct group and set the extras + + + .. py:method:: aim() + + Run Final AIM Calculation + + + .. py:method:: result() + + Put results in output node + + + .. py:class:: SubstituentParameterWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True) @@ -286,6 +403,11 @@ Attributes Submit the Gaussian optimization + .. py:method:: classify_opt_wfx() + + Add the wavefunction file from the previous step to the correct group and set the extras + + .. py:method:: aim_reor() Submit the Aimqb calculation and reorientation @@ -296,6 +418,11 @@ Attributes Run Gaussian Single Point calculation + .. py:method:: classify_sp_wfx() + + Add the wavefunction file from the previous step to the correct group and set the extras + + .. py:method:: aim() Run Final AIM Calculation diff --git a/docs/source/tutorials/aimtogaussian.ipynb b/docs/source/tutorials/aimtogaussian.ipynb index 21fa0ce..266345b 100644 --- a/docs/source/tutorials/aimtogaussian.ipynb +++ b/docs/source/tutorials/aimtogaussian.ipynb @@ -4,31 +4,610 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Workflow to automate passing wavefunction files to AimqbCalculation" + "# Generate a Gaussian Calculation using SMILES input" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Though not explicitly directly integrated with AIMAll software, `aiida-aimall` provides a workchain to take a SMILES string of a substituent as input, and generate and run a Gaussian calculation. This is provided in part due to workflows used by the authors in automating creation of data for large numbers of substituents automatically. The `SmilesToGaussianWorkchain` provides this functionality. It uses the RDKit package to convert the SMILES input to a molecular geometry, and then provides that to the Gaussian calculation.\n", + "\n", + "The SMILES provides should have exactly one asterisk indicating the point of attachment of the substituent to the substrate. **In the generated geometry, this \\* will be replaced with a hydrogen.** For example a valid input SMILES is \"\\*C\" for a methyl group, but a methylene group with SMILES \"\\*C\\*\" or methane with SMILES \"C\" are invalid SMILES for input in this `WorkChain`. If such inputs are passed, an exception will be raised." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setting up the calculation" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 14, "metadata": {}, "outputs": [ { - "name": "stdout", + "name": "stderr", "output_type": "stream", "text": [ - "this is workbook 2\n" + "/Users/chemlab/anaconda3/envs/aiida/lib/python3.12/site-packages/aiida/storage/psql_dos/backend.py:271: SAWarning: Object of type not in session, add operation along 'DbUser.dbnodes' will not proceed\n", + " with session.begin_nested() as savepoint:\n", + "/Users/chemlab/anaconda3/envs/aiida/lib/python3.12/site-packages/aiida/storage/psql_dos/orm/querybuilder/main.py:182: SAWarning: Object of type not in session, add operation along 'DbUser.dbnodes' will not proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)\n", + " result = build.query.count()\n" ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "print('this is workbook 2')" + "from aiida import load_profile\n", + "from aiida.plugins import WorkflowFactory\n", + "from aiida.orm import Str, load_code, Dict\n", + "from aiida.engine import submit\n", + "\n", + "load_profile()\n", + "SmilestoGaussianWorkchain = WorkflowFactory('aimall.smitog16')\n", + "builder = SmilestoGaussianWorkchain.get_builder()\n", + "# methyl group\n", + "builder.smiles = Str('*C')\n", + "builder.gaussian_parameters = Dict(\n", + " {\n", + " \"link0_parameters\": {\n", + " \"%chk\": \"aiida.chk\",\n", + " \"%mem\": \"3200MB\", # Currently set to use 8000 MB in .sh files\n", + " \"%nprocshared\": 4,\n", + " },\n", + " \"functional\": \"wb97xd\",\n", + " \"basis_set\": \"aug-cc-pvtz\",\n", + " \"charge\": 0,\n", + " \"multiplicity\": 1,\n", + " \"route_parameters\": {\"opt\": None, \"Output\": \"WFX\"},\n", + " \"input_parameters\": {\"output.wfx\": None},\n", + " }\n", + ")\n", + "builder.gaussian_code = load_code('gaussian@localhost')\n", + "\n", + "submit(builder)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Examining the output" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "N114289\n", + "\n", + "SmilesToGaussianWorkchain (114289)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114290\n", + "\n", + "get_substituent_input (114290)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114289->N114290\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114292\n", + "\n", + "parameters_with_cm (114292)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114289->N114292\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114294\n", + "\n", + "generate_structure_data (114294)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114289->N114294\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114296\n", + "\n", + "get_wfxname_from_gaussianinputs (114296)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114289->N114296\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114298\n", + "\n", + "GaussianCalculation (114298)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114289->N114298\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114301\n", + "\n", + "Dict (114301)\n", + "\n", + "\n", + "\n", + "N114289->N114301\n", + "\n", + "\n", + "RETURN\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N114304\n", + "\n", + "create_wfx_from_retrieved (114304)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114289->N114304\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114305\n", + "\n", + "SinglefileData (114305)\n", + "file.txt\n", + "\n", + "\n", + "\n", + "N114289->N114305\n", + "\n", + "\n", + "RETURN\n", + "wfx\n", + "\n", + "\n", + "\n", + "N3\n", + "\n", + "InstalledCode (3)\n", + "gaussian@localhost\n", + "\n", + "\n", + "\n", + "N3->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "gaussian_code\n", + "\n", + "\n", + "\n", + "N3->N114298\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N114283\n", + "\n", + "Str (114283)\n", + "*C\n", + "\n", + "\n", + "\n", + "N114283->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "smiles\n", + "\n", + "\n", + "\n", + "N114283->N114290\n", + "\n", + "\n", + "INPUT_CALC\n", + "smiles\n", + "\n", + "\n", + "\n", + "N114284\n", + "\n", + "Dict (114284)\n", + "\n", + "\n", + "\n", + "N114284->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "gaussian_parameters\n", + "\n", + "\n", + "\n", + "N114284->N114292\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114284->N114296\n", + "\n", + "\n", + "INPUT_CALC\n", + "gaussian_parameters\n", + "\n", + "\n", + "\n", + "N114285\n", + "\n", + "Int (114285)\n", + "value: 4\n", + "\n", + "\n", + "\n", + "N114285->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "nprocs\n", + "\n", + "\n", + "\n", + "N114286\n", + "\n", + "Int (114286)\n", + "value: 6400\n", + "\n", + "\n", + "\n", + "N114286->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "mem_mb\n", + "\n", + "\n", + "\n", + "N114287\n", + "\n", + "Int (114287)\n", + "value: 604800\n", + "\n", + "\n", + "\n", + "N114287->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "time_s\n", + "\n", + "\n", + "\n", + "N114288\n", + "\n", + "Bool (114288)\n", + "False\n", + "\n", + "\n", + "\n", + "N114288->N114289\n", + "\n", + "\n", + "INPUT_WORK\n", + "dry_run\n", + "\n", + "\n", + "\n", + "N114291\n", + "\n", + "Dict (114291)\n", + "\n", + "\n", + "\n", + "N114290->N114291\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114291->N114292\n", + "\n", + "\n", + "INPUT_CALC\n", + "smiles_dict\n", + "\n", + "\n", + "\n", + "N114291->N114294\n", + "\n", + "\n", + "INPUT_CALC\n", + "smiles_dict\n", + "\n", + "\n", + "\n", + "N114293\n", + "\n", + "Dict (114293)\n", + "\n", + "\n", + "\n", + "N114292->N114293\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114293->N114298\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114295\n", + "\n", + "StructureData (114295)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114294->N114295\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114295->N114298\n", + "\n", + "\n", + "INPUT_CALC\n", + "structure\n", + "\n", + "\n", + "\n", + "N114297\n", + "\n", + "Str (114297)\n", + "output.wfx\n", + "\n", + "\n", + "\n", + "N114296->N114297\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114297->N114304\n", + "\n", + "\n", + "INPUT_CALC\n", + "wfxname\n", + "\n", + "\n", + "\n", + "N114299\n", + "\n", + "RemoteData (114299)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114298->N114299\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114300\n", + "\n", + "FolderData (114300)\n", + "\n", + "\n", + "\n", + "N114298->N114300\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114298->N114301\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N114302\n", + "\n", + "Float (114302)\n", + "value: -40.5200736323\n", + "\n", + "\n", + "\n", + "N114298->N114302\n", + "\n", + "\n", + "CREATE\n", + "energy_ev\n", + "\n", + "\n", + "\n", + "N114303\n", + "\n", + "StructureData (114303)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114298->N114303\n", + "\n", + "\n", + "CREATE\n", + "output_structure\n", + "\n", + "\n", + "\n", + "N114300->N114304\n", + "\n", + "\n", + "INPUT_CALC\n", + "retrieved_folder\n", + "\n", + "\n", + "\n", + "N114304->N114305\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida.orm import load_node\n", + "from aiida.tools.visualization import Graph\n", + "\n", + "# workchain_node = load_node(114229)\n", + "graph = Graph(graph_attr={\"rankdir\": \"LR\"})\n", + "graph.recurse_descendants(\n", + " 114289,\n", + " origin_style=None,\n", + " include_process_inputs=True,\n", + " annotate_links=\"both\"\n", + ")\n", + "graph.graphviz\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The outputs of the workchain are the typical `GaussianCalculation` `output_parameters` from `aiida-gaussian`. Additionally, if a wfx or wfn file was created, it stores that as `SinglefileData` with node label 'output_wfx' for a wfx file whose name is 'output.wfx'." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Additional Options" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`SmilesToGaussianWorkchain` takes some additional inputs not provided above. Aside from the runtime parameters seen in the provenance graph generated, one can optionally provide a wavefunction group as `wfxgroup`. This will store the wavefunction file in the provided group. This is useful for use with the controllers, which scan for inputs to submit from given groups. This functionality will be covered in another tutorial.\n", + "\n", + "`SmilesToGaussianWorkchain` attempts to find a wavefunction file name from the provided Gaussian input. It does so by looking in the \"input_parameters\" section of the input dictionary for entries with \"wfx\" in the name. If for some reason this is not working, you can also pass `wfxname` as an input to explicitly find the wfx file name." + ] + }, + { + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [] } ], diff --git a/docs/source/tutorials/controllers.ipynb b/docs/source/tutorials/controllers.ipynb new file mode 100644 index 0000000..3373825 --- /dev/null +++ b/docs/source/tutorials/controllers.ipynb @@ -0,0 +1,170 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Linking Workflows together for automated substituent parameter generation\n", + "\n", + "While the `SubstituentParameterWorkchain` is extremely versatile for calculating individual substituent properties, performing these for a large group is non-trivial. In the author's use case, AIMAll software is not available on compute clusters and are run on local desktop. To not overload the local computer controllers can be used to limit number of active processes. Here, through linking various controllers together, the full `SubstituentParameterWorkchain` can be simulated.\n", + "\n", + "The controllers are implementations of the `FromGroupSubmissionController` from `aiida-submission-controller`. When instantiating a controller, you provide the `parent_group` that it scans for inputs. The controllers look for the unique extras values \"smiles\", which can be set as shown in the code block below. All nodes in the `parent_group` must have unique values of the \"smiles\". **NO NODES CAN HAVE DUPLICATE SMILES OR THE CONTROLLERS WILL NOT WORK**.\n", + "\n", + "```python\n", + "node.base.extras.set(\"smiles\",\"some_smiles\")\n", + "```\n", + "\n", + "From providing this, and setting up the correct groups to scan from, the controllers are then set to link together by putting the relevant nodes in the group for the next controller in the protocol, and setting its extras. The code below shows how the controllers can be linked for substituent parameter calculation. We set low max_concurrent for the AIM controllers to not overload the local computer." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from aiida import orm\n", + "from aiida.orm import Dict, load_group\n", + "from aiida_aimall.controllers import SmilesToGaussianController, AimAllSubmissionController, AimReorSubmissionController, GaussianSubmissionController\n", + "from aiida.plugins import DataFactory\n", + "from aiida import load_profile\n", + "from aiida.engine.processes.control import play_processes\n", + "import datetime\n", + "import time\n", + "load_profile()\n", + "AimqbParameters = DataFactory('aimall.aimqb')\n", + "aim_params = parameter_dict={\"naat\": 2, \"nproc\": 2, \"atlaprhocps\": True}\n", + "smile_controller = SmilesToGaussianController(\n", + " parent_group_label = 'smiles',\n", + " group_label = 'g16_opt',\n", + " code_label='gaussian@cedar',\n", + " g16_opt_params=orm.Dict(dict={\n", + " 'link0_parameters': {\n", + " '%chk':'aiida.chk',\n", + " \"%mem\": \"2000MB\", # Currently set to use 8000 MB in .sh files\n", + " \"%nprocshared\": 4,\n", + " },\n", + " 'functional':'wb97xd',\n", + " 'basis_set':'aug-cc-pvtz',\n", + " 'route_parameters': {'opt': None, 'freq':None,'Output':'WFX'},\n", + " \"input_parameters\": {\"output.wfx\\n\": None, \"output2.wfx\":None},\n", + " }),\n", + " wfxgroup = \"opt_wfx\",\n", + " nprocs = 4,\n", + " mem_mb = 3200,\n", + " time_s = 60*60*24*7,\n", + " max_concurrent = 100\n", + ")\n", + "aimreor_controller = AimReorSubmissionController(\n", + " parent_group_label = 'opt_wfx',\n", + " group_label = 'opt_aim',\n", + " max_concurrent = 1,\n", + " code_label='aimall@localhost',\n", + " reor_group = 'reor_structs',\n", + " aimparameters=aim_params\n", + ")\n", + "gaussian_controller = GaussianSubmissionController(\n", + " parent_group_label = 'reor_structs',\n", + " group_label = 'gaussian_sp',\n", + " max_concurrent = 100,\n", + " code_label='gaussian@cedar',\n", + " g16_sp_params=Dict(dict={\n", + " 'link0_parameters': {\n", + " '%chk':'aiida.chk',\n", + " \"%mem\": \"2000MB\",\n", + " \"%nprocshared\": 4,\n", + " },\n", + " 'functional':'wb97xd',\n", + " 'basis_set':'aug-cc-pvtz',\n", + " 'charge': 0,\n", + " 'multiplicity': 1,\n", + " 'route_parameters': {'nosymmetry':None, 'Output':'WFX'},\n", + " \"input_parameters\": {\"output.wfx\": None},\n", + " \n", + " }),\n", + " wfxgroup='reor_wfx'\n", + ")\n", + "aimall_controller = AimAllSubmissionController(\n", + " code_label='aimall@localhost',\n", + " parent_group_label = 'reor_wfx',\n", + " group_label = 'sp_aim',\n", + " max_concurrent = 1,\n", + " aimparameters=aim_params,\n", + " aim_parser='aimall.group'\n", + ")\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note in the definition of the controllers that we can see the links between the controllers implied. For example, `AIMReorSubmissionController` has an input `reor_group`. This input is the label of the group that the generated structures are stored in by the workchain. We can also see that `GaussianSubmissionController` has an input `parent_group_label=\"reor_structs\"`. So, in this case, the `AIMReorSubmissionController` generates structures into a group, which `GaussianSubmissionController` then checks for its inputs.\n", + "\n", + "These controllers are then run in a `while` loop, either in a Jupyter notebook or a script" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```python\n", + "def prune_group(group_label):\n", + " \"\"\"Removes earlier instances of a given group from the group to ensure unique extras.\"\"\"\n", + " group = load_group(group_label)\n", + " smiles={}\n", + " for node in group.nodes:\n", + " smi = node.extras['smiles'] \n", + " if smi in smiles:\n", + " pk_to_del = min(smiles[smi].pk,node.pk)\n", + " group.remove_nodes(orm.load_node(pk_to_del))\n", + " else:\n", + " smiles[smi] = node\n", + "\n", + "total_jobs = smile_controller.num_to_run + smile_controller.num_already_run\n", + "while aimall_controller.num_already_run < total_jobs:\n", + " play_processes(all_entries=True)\n", + " # prune_group('smiles')\n", + " smile_controller.submit_new_batch()\n", + " # this will loop 10 times, checking for finished AIM calculations to submit every 3 minutes.\n", + " # After the set of 10 loops, the outer loop happens again, checking the Gaussian Optimization calculations\n", + " # Due to Gaussian jobs longer run time, we elected to check every 30 minutes. \n", + " # You can adjust the loops to suit your needs\n", + " for _ in range(10):\n", + " prune_group('opt_wfx')\n", + " prune_group('reor_structs')\n", + " prune_group('reor_wfx')\n", + " try:\n", + " gaussian_controller.submit_new_batch()\n", + " \n", + " except:\n", + " print(f\"Skipping Gaussian this loop at {datetime.now()} \")\n", + " try:\n", + " aimall_controller.submit_new_batch()\n", + " \n", + " except:\n", + " print(f\"Skipping AIMAll this loop at {datetime.now()} \")\n", + " try:\n", + " aimreor_controller.submit_new_batch()\n", + " \n", + " except:\n", + " print(f\"Skipping AIMReor this loop at {datetime.now()} \")\n", + " time.sleep(180)\n", + "```" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "aiida", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.12.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/source/tutorials/index.md b/docs/source/tutorials/index.md index c6c1b33..e51dc89 100644 --- a/docs/source/tutorials/index.md +++ b/docs/source/tutorials/index.md @@ -12,6 +12,9 @@ aimqbparameters.ipynb aimqbcalculation.ipynb aimqbgroupcalculation.ipynb aimtogaussian.ipynb +substituentparameter.ipynb +quantumsoftware.ipynb +controllers.ipynb ``` ::::{grid} 2 @@ -80,7 +83,7 @@ Using `aiida-aimall` to compute group properties. :text-align: center :shadow: md -The simplest workflow, linking a electronic structure software and AIMQB +Workflow to generate a Gaussian calculation from a Substituent SMILES +++ @@ -93,3 +96,80 @@ The simplest workflow, linking a electronic structure software and AIMQB ``` ::: :::: + +::::{grid} 2 +:gutter: 3 + +:::{grid-item-card} {fa}`info-circle;mr-1` `One step Workflow` +:text-align: center +:shadow: md + +Using `aiida-aimall` to compute group properties. + ++++ + +```{button-ref} quantumsoftware +:ref-type: doc +:click-parent: +:expand: +:color: primary +:outline: +``` +::: + +:::{grid-item-card} {fa}`info-circle;mr-1` `Multi Step Workflow` +:text-align: center +:shadow: md + +Workflow to start at a Gaussian calculation, optimize a molecule, run AIM, reorient, run Gaussian single point, run AIM, and get resulting substituent properties. + ++++ + +```{button-ref} substituentparameter +:ref-type: doc +:click-parent: +:expand: +:color: primary +:outline: +``` +::: +:::: + + +::::{grid} 2 +:gutter: 3 + +:::{grid-item-card} {fa}`info-circle;mr-1` `Breaking the process into controllers` +:text-align: center +:shadow: md + +Use controllers to compute substituent properties for a large set of substituents. + ++++ + +```{button-ref} controllers +:ref-type: doc +:click-parent: +:expand: +:color: primary +:outline: +``` +::: + +:::{grid-item-card} {fa}`info-circle;mr-1` `Generating WFX from other calculations` +:text-align: center +:shadow: md + +Workflow to generate .wfx files from MOLDEN, .fchk, or CP2K atom log files + ++++ + +```{button-ref} makewfx +:ref-type: doc +:click-parent: +:expand: +:color: primary +:outline: +``` +::: +:::: diff --git a/docs/source/tutorials/makewfx.ipynb b/docs/source/tutorials/makewfx.ipynb new file mode 100644 index 0000000..3fbd3bd --- /dev/null +++ b/docs/source/tutorials/makewfx.ipynb @@ -0,0 +1,468 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Generating WFX files from other computational software output" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Many different versions of computational software for electronic structure calculations are in use. Should you wish to run AIM calculations, but may not have wfx files as the output of this software, `aiida-aimall` provides functionality to generate wfx files from some output and automatically run AIM calculations on the outputs. To do this, we use the `qc-iodata` package of Paul Ayer's Horton software\n", + "\n", + "Supported output file formats are:\n", + " * Molden\n", + " * fchk\n", + " * cp2k\n", + "\n", + "## Only Generating wfx file\n", + "\n", + "Molden files can be produced by numerous software suites such as Molpro, Orca, PSI4, Molden and Turbomole. Provided in `aiida-aimall` is a workchain to generate the wfx from these files and automatically create an AimqbCalculation for it. However, should one desire only the wfx file, you can run `iodata-convert` to convert the file locally. Should you desire the wfx file to be in the AiiDA database, the authors suggest making use of `aiida-shell`, as follows. You can change output.wfx in BOTH the `arguments` AND `outputs` to match the filename you desire.\n", + "\n", + "```python\n", + "from aiida_shell import launch_shell_job\n", + "from aiida.orm import SinglefileData\n", + "\n", + "in_file = SinglefileData('/path/to/your/.molden.input')\n", + "_, node = launch_shell_job(\n", + " 'iodata-convert',\n", + " arguments='{file} output.wfx',\n", + " nodes={\"file\": in_file},\n", + " outputs=['output.wfx'],\n", + " submit=True,\n", + " )\n", + "```\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Workflow for generating wfx and running AIM" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida import load_profile\n", + "from aiida.plugins import WorkflowFactory, DataFactory\n", + "from aiida.orm import load_node,load_code\n", + "from aiida.engine import submit\n", + "\n", + "load_profile()\n", + "GenerateWFXToAIMWorkchain = WorkflowFactory(\"aimall.wfxtoaim\")\n", + "AimqbParameters = DataFactory(\"aimall.aimqb\")\n", + "# predefined Molden input file in database\n", + "single_file = load_node(114541)\n", + "aim_params = AimqbParameters({\"naat\": 2, \"nproc\": 2, \"atlaprhocps\": True})\n", + "aim_code = load_code(\"aimall@localhost\")\n", + "builder = GenerateWFXToAIMWorkchain.get_builder()\n", + "builder.input_file = single_file\n", + "builder.aim_params = aim_params\n", + "builder.aim_code = aim_code\n", + "submit(builder)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "N116427\n", + "\n", + "GenerateWFXToAIMWorkchain (116427)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N116430\n", + "\n", + "ShellJob<iodata-convert@localhost> (116430)\n", + "State: finished\n", + "Exit Code: 410\n", + "\n", + "\n", + "\n", + "N116427->N116430\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N116438\n", + "\n", + "AimqbCalculation (116438)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N116427->N116438\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N116441\n", + "\n", + "Dict (116441)\n", + "\n", + "\n", + "\n", + "N116427->N116441\n", + "\n", + "\n", + "RETURN\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N4\n", + "\n", + "InstalledCode (4)\n", + "aimall@localhost\n", + "\n", + "\n", + "\n", + "N4->N116427\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_code\n", + "\n", + "\n", + "\n", + "N4->N116438\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N114540\n", + "\n", + "ShellCode (114540)\n", + "iodata-convert@localhost\n", + "\n", + "\n", + "\n", + "N114540->N116430\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N114541\n", + "\n", + "SinglefileData (114541)\n", + "test.molden.input\n", + "\n", + "\n", + "\n", + "N114541->N116427\n", + "\n", + "\n", + "INPUT_WORK\n", + "input_file\n", + "\n", + "\n", + "\n", + "N114541->N116430\n", + "\n", + "\n", + "INPUT_CALC\n", + "nodes__file\n", + "\n", + "\n", + "\n", + "N116426\n", + "\n", + "AimqbParameters (116426)\n", + "\n", + "\n", + "\n", + "N116426->N116427\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_params\n", + "\n", + "\n", + "\n", + "N116426->N116438\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N116428\n", + "\n", + "List (116428)\n", + "\n", + "\n", + "\n", + "N116428->N116430\n", + "\n", + "\n", + "INPUT_CALC\n", + "arguments\n", + "\n", + "\n", + "\n", + "N116429\n", + "\n", + "List (116429)\n", + "\n", + "\n", + "\n", + "N116429->N116430\n", + "\n", + "\n", + "INPUT_CALC\n", + "outputs\n", + "\n", + "\n", + "\n", + "N116431\n", + "\n", + "RemoteData (116431)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N116430->N116431\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N116432\n", + "\n", + "FolderData (116432)\n", + "\n", + "\n", + "\n", + "N116430->N116432\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N116433\n", + "\n", + "SinglefileData (116433)\n", + "output.wfx\n", + "\n", + "\n", + "\n", + "N116430->N116433\n", + "\n", + "\n", + "CREATE\n", + "output_wfx\n", + "\n", + "\n", + "\n", + "N116434\n", + "\n", + "SinglefileData (116434)\n", + "stderr\n", + "\n", + "\n", + "\n", + "N116430->N116434\n", + "\n", + "\n", + "CREATE\n", + "stderr\n", + "\n", + "\n", + "\n", + "N116435\n", + "\n", + "SinglefileData (116435)\n", + "stdout\n", + "\n", + "\n", + "\n", + "N116430->N116435\n", + "\n", + "\n", + "CREATE\n", + "stdout\n", + "\n", + "\n", + "\n", + "N116433->N116438\n", + "\n", + "\n", + "INPUT_CALC\n", + "file\n", + "\n", + "\n", + "\n", + "N116436\n", + "\n", + "Int (116436)\n", + "value: 1\n", + "\n", + "\n", + "\n", + "N116436->N116438\n", + "\n", + "\n", + "INPUT_CALC\n", + "attached_atom_int\n", + "\n", + "\n", + "\n", + "N116437\n", + "\n", + "List (116437)\n", + "\n", + "\n", + "\n", + "N116437->N116438\n", + "\n", + "\n", + "INPUT_CALC\n", + "group_atoms\n", + "\n", + "\n", + "\n", + "N116439\n", + "\n", + "RemoteData (116439)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N116438->N116439\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N116440\n", + "\n", + "FolderData (116440)\n", + "\n", + "\n", + "\n", + "N116438->N116440\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N116438->N116441\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida.tools.visualization import Graph\n", + "graph = Graph(graph_attr={\"size\": \"6,6!\", \"rankdir\": \"LR\"})\n", + "graph = Graph(graph_attr={\"rankdir\": \"LR\"})\n", + "graph.recurse_descendants(\n", + " 116427,\n", + " origin_style=None,\n", + " include_process_inputs=True,\n", + " annotate_links=\"both\"\n", + ")\n", + "graph.graphviz" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here we can view the provenance for the `AimqbCalculation` generated after creating the wfx file with `iodata-convert` through `aiida_shell`. Note that in this instance the `ShellJob` has an exit code 410 due to some stderr being printed. The error displayed is just a notice regarding `iodata-convert` fixing the incorrect Molden format that was generated by Orca." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "aiida", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/source/tutorials/quantumsoftware.ipynb b/docs/source/tutorials/quantumsoftware.ipynb new file mode 100644 index 0000000..b92e3dd --- /dev/null +++ b/docs/source/tutorials/quantumsoftware.ipynb @@ -0,0 +1,1114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Automatically running electronic structure calculations linked to AIMQB calculations" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/chemlab/anaconda3/envs/aiida/lib/python3.12/site-packages/aiida/storage/psql_dos/backend.py:271: SAWarning: Object of type not in session, add operation along 'DbUser.dbnodes' will not proceed\n", + " with session.begin_nested() as savepoint:\n", + "/Users/chemlab/anaconda3/envs/aiida/lib/python3.12/site-packages/aiida/storage/psql_dos/orm/querybuilder/main.py:182: SAWarning: Object of type not in session, add operation along 'DbUser.dbnodes' will not proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)\n", + " result = build.query.count()\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida import load_profile\n", + "from aiida.plugins import WorkflowFactory,DataFactory\n", + "from aiida.orm import Dict, StructureData, load_code\n", + "import io\n", + "import ase.io\n", + "from aiida.engine import submit\n", + "load_profile()\n", + "GaussianToAIMWorkChain = WorkflowFactory('aimall.g16toaim')\n", + "AimqbParameters = DataFactory('aimall.aimqb')\n", + "\n", + "gaussian_input = Dict(\n", + " {\n", + " \"link0_parameters\": {\n", + " \"%chk\": \"aiida.chk\",\n", + " \"%mem\": \"3200MB\", # Currently set to use 8000 MB in .sh files\n", + " \"%nprocshared\": 4,\n", + " },\n", + " \"functional\": \"wb97xd\",\n", + " \"basis_set\": \"aug-cc-pvtz\",\n", + " \"charge\": 0,\n", + " \"multiplicity\": 1,\n", + " \"route_parameters\": {\"opt\": None, \"Output\": \"WFX\"},\n", + " \"input_parameters\": {\"output.wfx\": None},\n", + " })\n", + "aim_input = AimqbParameters({'nproc':2,'naat':2,'atlaprhocps':True})\n", + "# For tutorial purpose, representing a xyz file as a string, and parsing it to get strcutre data\n", + "f = io.StringIO(\n", + " \"5\\n\\n C -0.1 2.0 -0.02\\nH 0.3 1.0 -0.02\\nH 0.3 2.5 0.8\\nH 0.3 2.5 -0.9\\nH -1.2 2.0 -0.02\"\n", + " )\n", + "struct_data = StructureData(ase=ase.io.read(f, format=\"xyz\"))\n", + "f.close()\n", + "builder = GaussianToAIMWorkChain.get_builder()\n", + "builder.g16_params = gaussian_input\n", + "builder.aim_params = aim_input\n", + "builder.structure = struct_data\n", + "builder.g16_code = load_code('gaussian@localhost')\n", + "builder.aim_code = load_code('aimall@localhost')\n", + "submit(builder)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "N114349\n", + "\n", + "GaussianToAIMWorkChain (114349)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114350\n", + "\n", + "GaussianCalculation (114350)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114349->N114350\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114356\n", + "\n", + "get_wfx (114356)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114349->N114356\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114360\n", + "\n", + "AimqbCalculation (114360)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114349->N114360\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114363\n", + "\n", + "Dict (114363)\n", + "\n", + "\n", + "\n", + "N114349->N114363\n", + "\n", + "\n", + "RETURN\n", + "parameter_dict\n", + "\n", + "\n", + "\n", + "N3\n", + "\n", + "InstalledCode (3)\n", + "gaussian@localhost\n", + "\n", + "\n", + "\n", + "N3->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "g16_code\n", + "\n", + "\n", + "\n", + "N3->N114350\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N4\n", + "\n", + "InstalledCode (4)\n", + "aimall@localhost\n", + "\n", + "\n", + "\n", + "N4->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_code\n", + "\n", + "\n", + "\n", + "N4->N114360\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N114344\n", + "\n", + "Dict (114344)\n", + "\n", + "\n", + "\n", + "N114344->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "g16_params\n", + "\n", + "\n", + "\n", + "N114344->N114350\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114345\n", + "\n", + "AimqbParameters (114345)\n", + "\n", + "\n", + "\n", + "N114345->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_params\n", + "\n", + "\n", + "\n", + "N114345->N114360\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114346\n", + "\n", + "StructureData (114346)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114346->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "structure\n", + "\n", + "\n", + "\n", + "N114346->N114350\n", + "\n", + "\n", + "INPUT_CALC\n", + "structure\n", + "\n", + "\n", + "\n", + "N114347\n", + "\n", + "Bool (114347)\n", + "False\n", + "\n", + "\n", + "\n", + "N114347->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "dry_run\n", + "\n", + "\n", + "\n", + "N114348\n", + "\n", + "Str (114348)\n", + "output.wfx\n", + "\n", + "\n", + "\n", + "N114348->N114349\n", + "\n", + "\n", + "INPUT_WORK\n", + "wfx_filename\n", + "\n", + "\n", + "\n", + "N114348->N114356\n", + "\n", + "\n", + "INPUT_CALC\n", + "wfx_filename\n", + "\n", + "\n", + "\n", + "N114351\n", + "\n", + "RemoteData (114351)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114350->N114351\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114352\n", + "\n", + "FolderData (114352)\n", + "\n", + "\n", + "\n", + "N114350->N114352\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114353\n", + "\n", + "Dict (114353)\n", + "\n", + "\n", + "\n", + "N114350->N114353\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N114354\n", + "\n", + "Float (114354)\n", + "value: -40.5200702661\n", + "\n", + "\n", + "\n", + "N114350->N114354\n", + "\n", + "\n", + "CREATE\n", + "energy_ev\n", + "\n", + "\n", + "\n", + "N114355\n", + "\n", + "StructureData (114355)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114350->N114355\n", + "\n", + "\n", + "CREATE\n", + "output_structure\n", + "\n", + "\n", + "\n", + "N114352->N114356\n", + "\n", + "\n", + "INPUT_CALC\n", + "retrieved_folder\n", + "\n", + "\n", + "\n", + "N114357\n", + "\n", + "SinglefileData (114357)\n", + "file.txt\n", + "\n", + "\n", + "\n", + "N114356->N114357\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114357->N114360\n", + "\n", + "\n", + "INPUT_CALC\n", + "file\n", + "\n", + "\n", + "\n", + "N114358\n", + "\n", + "List (114358)\n", + "\n", + "\n", + "\n", + "N114358->N114360\n", + "\n", + "\n", + "INPUT_CALC\n", + "group_atoms\n", + "\n", + "\n", + "\n", + "N114359\n", + "\n", + "Int (114359)\n", + "value: 1\n", + "\n", + "\n", + "\n", + "N114359->N114360\n", + "\n", + "\n", + "INPUT_CALC\n", + "attached_atom_int\n", + "\n", + "\n", + "\n", + "N114361\n", + "\n", + "RemoteData (114361)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114360->N114361\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114362\n", + "\n", + "FolderData (114362)\n", + "\n", + "\n", + "\n", + "N114360->N114362\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114360->N114363\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida.tools.visualization import Graph\n", + "graph = Graph(graph_attr={\"size\": \"6,6!\", \"rankdir\": \"LR\"})\n", + "graph = Graph(graph_attr={\"rankdir\": \"LR\"})\n", + "graph.recurse_descendants(\n", + " 114349,\n", + " origin_style=None,\n", + " include_process_inputs=True,\n", + " annotate_links=\"both\"\n", + ")\n", + "graph.graphviz" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, the main output of the workchain is specified as the output parameters of the `AimqbCalculation`. The structure of this has been discussed in other tutorials. The provenance graph is displayed to see. Gaussian output can be queried for." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Other inputs\n", + "\n", + "The wfx filename defaults to output.wfx, you can specify that in the Gaussian input input_parameters section. If you specify a filename other than output.wfx, supply the filename to inputs\n", + "\n", + "```python\n", + "builder.inputs.wfx_filename = Str('your_wfx_filename.wfx')\n", + "```\n", + "\n", + "Further, you can also supply some information to store various nodes in groups. You can provide `wfx_group` as a node to put wfx files in, or `gaussian_group` for a group to store the Gaussian node as an `Str`. Provided as an option due to the authors' use case, a `fragment_label` `Str` can also be provided to stores as the smiles extra on the node." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Using other Electronic Structure Software" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Options are provided for integrating other electronic structure software through the use of `aiida-shell`, as provided in the `QMToAIMWorkchain`. An example is given here for ORCA software. For this, you can provide a setup `ShellCode` instance for the code being run, or a `Str` of the command used to run the software. The authors note that by default settings on some compute clusters, AiiDA commands may be restricted. In the author's case, providing \"orca\" to the input results in an error due to the script used in Multifactor Authentication scripts, due to attempts to use the `which orca` command. In light of this, depending on your compute resources, the authors suggest setting up a `ShellCode` instance\n", + "\n", + "```python\n", + "from aiida_shell import ShellCode\n", + "from aiida.orm import load_computer\n", + "\n", + "code = ShellCode(label = 'orca',\n", + " computer = load_computer('localhost'),\n", + " filepath_executable='/Applications/orca/orca',\n", + " default_calc_job_plugin='core.shell',\n", + " with_mpi=False)\n", + "\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida_shell import ShellCode\n", + "from aiida.orm import load_computer, List, SinglefileData, Str, load_code\n", + "QMToAIMWorkchain = WorkflowFactory('aimall.qmtoaim')\n", + "# already have an orca code setup, you can use the codeblock above to do so\n", + "\n", + "code = load_code('orca@cedar')\n", + "builder = QMToAIMWorkchain.get_builder()\n", + "builder.shell_code = code\n", + "builder.shell_metadata = Dict(\n", + " {\n", + " 'options': {\n", + " 'withmpi': False,\n", + " # modules for the compute cluster to load\n", + " 'prepend_text': 'module load StdEnv/2020; module load gcc/10.3.0; module load openmpi/4.1.1; module load orca/5.0.4',\n", + " 'resources': {\n", + " 'num_machines': 1,\n", + " 'num_mpiprocs_per_machine': 4,\n", + " },\n", + " 'max_memory_kb': int(3200 * 1.25) * 1024,\n", + " 'max_wallclock_seconds': 3600\n", + " }\n", + " }\n", + ")\n", + "# again, for tutorial, using a string parsed as file in place of providing an input file\n", + "input_file = SinglefileData(io.BytesIO('! B3LYP def2-SVP Opt AIM PAL4\\n*xyz 0 1\\nH 0.0 0.0 0.0\\nH 0.0 0.0 1.0\\n*'.encode()))\n", + "builder.shell_input_file = input_file\n", + "# get the resulting wfx and opt file, the above command creates a file file.txt so we replace the txt with the output extensions we want\n", + "builder.shell_retrieved = List([input_file.filename.replace('txt','wfx'),input_file.filename.replace('txt','opt'),])\n", + "builder.shell_cmdline = Str('{file}')\n", + "builder.aim_code = load_code('aimall@localhost')\n", + "builder.aim_params = AimqbParameters({'nproc':2,'naat':2,'atlaprhocps':True})\n", + "\n", + "submit(builder)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, the orca output files requested are directly stored on the provenance graph. No parser is provided, though the ability to define parsers is available in `aiida-shell`. For the purposes of `aiida-aimall` you can specify which files you want, get them and manually parse the content. [Documentation on using custom parsers can be found here.](https://aiida-shell.readthedocs.io/en/latest/howto.html#custom-output-parsing) The authors recommend creating a fork of `aiida-aimall`, adding the parser function you wish to use to the `workchains.py` file, and providing `parser=your_parser_function_name` to `launch_shell_job` in the `QMToAIMWorkchain` if you wish to use a custom parser." + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "N114388\n", + "\n", + "QMToAIMWorkchain (114388)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114391\n", + "\n", + "ShellJob<orca@cedar> (114391)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114388->N114391\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114400\n", + "\n", + "AimqbCalculation (114400)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114388->N114400\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114403\n", + "\n", + "Dict (114403)\n", + "\n", + "\n", + "\n", + "N114388->N114403\n", + "\n", + "\n", + "RETURN\n", + "parameter_dict\n", + "\n", + "\n", + "\n", + "N4\n", + "\n", + "InstalledCode (4)\n", + "aimall@localhost\n", + "\n", + "\n", + "\n", + "N4->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_code\n", + "\n", + "\n", + "\n", + "N4->N114400\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N108817\n", + "\n", + "ShellCode (108817)\n", + "orca@cedar\n", + "\n", + "\n", + "\n", + "N108817->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "shell_code\n", + "\n", + "\n", + "\n", + "N108817->N114391\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N114380\n", + "\n", + "Dict (114380)\n", + "\n", + "\n", + "\n", + "N114380->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "shell_metadata\n", + "\n", + "\n", + "\n", + "N114381\n", + "\n", + "SinglefileData (114381)\n", + "file.txt\n", + "\n", + "\n", + "\n", + "N114381->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "shell_input_file\n", + "\n", + "\n", + "\n", + "N114381->N114391\n", + "\n", + "\n", + "INPUT_CALC\n", + "nodes__file\n", + "\n", + "\n", + "\n", + "N114382\n", + "\n", + "List (114382)\n", + "\n", + "\n", + "\n", + "N114382->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "shell_retrieved\n", + "\n", + "\n", + "\n", + "N114383\n", + "\n", + "Str (114383)\n", + "{file}\n", + "\n", + "\n", + "\n", + "N114383->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "shell_cmdline\n", + "\n", + "\n", + "\n", + "N114384\n", + "\n", + "AimqbParameters (114384)\n", + "\n", + "\n", + "\n", + "N114384->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_params\n", + "\n", + "\n", + "\n", + "N114384->N114400\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114385\n", + "\n", + "Str (114385)\n", + "wfx\n", + "\n", + "\n", + "\n", + "N114385->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_file_ext\n", + "\n", + "\n", + "\n", + "N114386\n", + "\n", + "Str (114386)\n", + "aimall.base\n", + "\n", + "\n", + "\n", + "N114386->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_parser\n", + "\n", + "\n", + "\n", + "N114387\n", + "\n", + "Bool (114387)\n", + "False\n", + "\n", + "\n", + "\n", + "N114387->N114388\n", + "\n", + "\n", + "INPUT_WORK\n", + "dry_run\n", + "\n", + "\n", + "\n", + "N114389\n", + "\n", + "List (114389)\n", + "\n", + "\n", + "\n", + "N114389->N114391\n", + "\n", + "\n", + "INPUT_CALC\n", + "arguments\n", + "\n", + "\n", + "\n", + "N114390\n", + "\n", + "List (114390)\n", + "\n", + "\n", + "\n", + "N114390->N114391\n", + "\n", + "\n", + "INPUT_CALC\n", + "outputs\n", + "\n", + "\n", + "\n", + "N114392\n", + "\n", + "RemoteData (114392)\n", + "@cedar\n", + "\n", + "\n", + "\n", + "N114391->N114392\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114393\n", + "\n", + "FolderData (114393)\n", + "\n", + "\n", + "\n", + "N114391->N114393\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114394\n", + "\n", + "SinglefileData (114394)\n", + "file.wfx\n", + "\n", + "\n", + "\n", + "N114391->N114394\n", + "\n", + "\n", + "CREATE\n", + "file_wfx\n", + "\n", + "\n", + "\n", + "N114395\n", + "\n", + "SinglefileData (114395)\n", + "file.opt\n", + "\n", + "\n", + "\n", + "N114391->N114395\n", + "\n", + "\n", + "CREATE\n", + "file_opt\n", + "\n", + "\n", + "\n", + "N114396\n", + "\n", + "SinglefileData (114396)\n", + "stderr\n", + "\n", + "\n", + "\n", + "N114391->N114396\n", + "\n", + "\n", + "CREATE\n", + "stderr\n", + "\n", + "\n", + "\n", + "N114397\n", + "\n", + "SinglefileData (114397)\n", + "stdout\n", + "\n", + "\n", + "\n", + "N114391->N114397\n", + "\n", + "\n", + "CREATE\n", + "stdout\n", + "\n", + "\n", + "\n", + "N114394->N114400\n", + "\n", + "\n", + "INPUT_CALC\n", + "file\n", + "\n", + "\n", + "\n", + "N114398\n", + "\n", + "Int (114398)\n", + "value: 1\n", + "\n", + "\n", + "\n", + "N114398->N114400\n", + "\n", + "\n", + "INPUT_CALC\n", + "attached_atom_int\n", + "\n", + "\n", + "\n", + "N114399\n", + "\n", + "List (114399)\n", + "\n", + "\n", + "\n", + "N114399->N114400\n", + "\n", + "\n", + "INPUT_CALC\n", + "group_atoms\n", + "\n", + "\n", + "\n", + "N114401\n", + "\n", + "RemoteData (114401)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114400->N114401\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114402\n", + "\n", + "FolderData (114402)\n", + "\n", + "\n", + "\n", + "N114400->N114402\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114400->N114403\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida.tools.visualization import Graph\n", + "graph = Graph(graph_attr={\"size\": \"6,6!\", \"rankdir\": \"LR\"})\n", + "graph = Graph(graph_attr={\"rankdir\": \"LR\"})\n", + "graph.recurse_descendants(\n", + " 114388,\n", + " origin_style=None,\n", + " include_process_inputs=True,\n", + " annotate_links=\"both\"\n", + ")\n", + "graph.graphviz" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "aiida", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/source/tutorials/substituentparameter.ipynb b/docs/source/tutorials/substituentparameter.ipynb new file mode 100644 index 0000000..a1351f1 --- /dev/null +++ b/docs/source/tutorials/substituentparameter.ipynb @@ -0,0 +1,1031 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Workflow to fully automate the substituent parameter calculation of the authors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The substituent parameter protocol developed by the authors is able to be fully automated in `aiida-aimall` through use of the `SubstituentParameterWorkchain`. This workchain undertakes the following steps\n", + "1. Gaussian optimization of the input structure\n", + "2. performs AIM on the output wfx file\n", + "3. Uses that AIM calculation to reorient the molecule\n", + "4. Runs a Gaussian singlepoint on the resulting structure\n", + "5. Runs AIM on the resulting file using the `AimqbGroupParser`, with the group being set to all atoms except for atom 2 (typically a substrate hydrogen)\n", + "\n", + "Inputs are similar to other parts of the package that have already been used. You should provide as inputs to the builder:\n", + "1. structure (`orm.StructureData`)\n", + "2. g16_code - setup code for Gaussian Software\n", + "3. aim_code - setup code for AIMQB software\n", + "4. aim_params (`aiida_aimall.data.AimqbParameters`)\n", + "5. g16_opt_params (`orm.Dict`) - parameters for the Gaussian optimization calculation\n", + "6. g16_sp_params (`orm.Dict`) - parameters for the Gaussian singlepoint calculation. **Note that the route parameters should include \"nosymmetry\":None in the dictionary as a key/value pair\n", + "7. wfx_filename (`orm.Str`) - if the wfx filename in the Gaussian parameters inputs is different than \"output.wfx\", provide the actual wfx filename here." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida.plugins import WorkflowFactory, DataFactory\n", + "from aiida.orm import Dict, StructureData, load_code\n", + "from aiida.engine import submit\n", + "from aiida import load_profile\n", + "import io\n", + "import ase.io\n", + "\n", + "load_profile()\n", + "\n", + "SubstituentParameterWorkchain = WorkflowFactory('aimall.subparam')\n", + "AimqbParameters = DataFactory('aimall.aimqb')\n", + "aim_input = AimqbParameters({'nproc':2,'naat':2,'atlaprhocps':True})\n", + "gaussian_opt = Dict(\n", + " {\n", + " \"link0_parameters\": {\n", + " \"%chk\": \"aiida.chk\",\n", + " \"%mem\": \"3200MB\", # Currently set to use 8000 MB in .sh files\n", + " \"%nprocshared\": 4,\n", + " },\n", + " \"functional\": \"wb97xd\",\n", + " \"basis_set\": \"aug-cc-pvtz\",\n", + " \"charge\": 0,\n", + " \"multiplicity\": 1,\n", + " \"route_parameters\": {\"opt\": None, \"Output\": \"WFX\"},\n", + " \"input_parameters\": {\"output.wfx\": None},\n", + " }\n", + ")\n", + "gaussian_sp = Dict(\n", + " {\n", + " \"link0_parameters\": {\n", + " \"%chk\": \"aiida.chk\",\n", + " \"%mem\": \"3200MB\", # Currently set to use 8000 MB in .sh files\n", + " \"%nprocshared\": 4,\n", + " },\n", + " \"functional\": \"wb97xd\",\n", + " \"basis_set\": \"aug-cc-pvtz\",\n", + " \"charge\": 0,\n", + " \"multiplicity\": 1,\n", + " \"route_parameters\": {\"nosymmetry\": None, \"Output\": \"WFX\"},\n", + " \"input_parameters\": {\"output.wfx\": None},\n", + " }\n", + ")\n", + "f = io.StringIO(\n", + " \"5\\n\\n C -0.1 2.0 -0.02\\nH 0.3 1.0 -0.02\\nH 0.3 2.5 0.8\\nH 0.3 2.5 -0.9\\nH -1.2 2.0 -0.02\"\n", + " )\n", + "struct_data = StructureData(ase=ase.io.read(f, format=\"xyz\"))\n", + "f.close()\n", + "builder = SubstituentParameterWorkchain.get_builder()\n", + "builder.g16_code = load_code('gaussian@localhost')\n", + "builder.aim_code = load_code('aimall@localhost')\n", + "builder.g16_opt_params = gaussian_opt\n", + "builder.g16_sp_params = gaussian_sp\n", + "builder.structure = struct_data\n", + "builder.aim_params = aim_input\n", + "submit(builder)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Outputs\n", + "\n", + "The provenace graph generates shows a full history of the calculation, and its final outputs are the output_parameters of the final AIMQB calculation." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "N114502\n", + "\n", + "SubstituentParameterWorkChain (114502)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114503\n", + "\n", + "GaussianCalculation (114503)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114502->N114503\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114510\n", + "\n", + "get_wfx (114510)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114502->N114510\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114513\n", + "\n", + "AIMAllReor (114513)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114502->N114513\n", + "\n", + "\n", + "CALL_WORK\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114526\n", + "\n", + "GaussianCalculation (114526)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114502->N114526\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114532\n", + "\n", + "get_wfx (114532)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114502->N114532\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114536\n", + "\n", + "AimqbCalculation (114536)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114502->N114536\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114539\n", + "\n", + "Dict (114539)\n", + "\n", + "\n", + "\n", + "N114502->N114539\n", + "\n", + "\n", + "RETURN\n", + "parameter_dict\n", + "\n", + "\n", + "\n", + "N3\n", + "\n", + "InstalledCode (3)\n", + "gaussian@localhost\n", + "\n", + "\n", + "\n", + "N3->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "g16_code\n", + "\n", + "\n", + "\n", + "N3->N114503\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N3->N114526\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N4\n", + "\n", + "InstalledCode (4)\n", + "aimall@localhost\n", + "\n", + "\n", + "\n", + "N4->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_code\n", + "\n", + "\n", + "\n", + "N4->N114513\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_code\n", + "\n", + "\n", + "\n", + "N114516\n", + "\n", + "AimqbCalculation (114516)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N4->N114516\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N4->N114536\n", + "\n", + "\n", + "INPUT_CALC\n", + "code\n", + "\n", + "\n", + "\n", + "N114496\n", + "\n", + "Dict (114496)\n", + "\n", + "\n", + "\n", + "N114496->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "g16_opt_params\n", + "\n", + "\n", + "\n", + "N114496->N114503\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114497\n", + "\n", + "Dict (114497)\n", + "\n", + "\n", + "\n", + "N114497->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "g16_sp_params\n", + "\n", + "\n", + "\n", + "N114497->N114526\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114498\n", + "\n", + "StructureData (114498)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114498->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "structure\n", + "\n", + "\n", + "\n", + "N114498->N114503\n", + "\n", + "\n", + "INPUT_CALC\n", + "structure\n", + "\n", + "\n", + "\n", + "N114499\n", + "\n", + "AimqbParameters (114499)\n", + "\n", + "\n", + "\n", + "N114499->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_params\n", + "\n", + "\n", + "\n", + "N114499->N114513\n", + "\n", + "\n", + "INPUT_WORK\n", + "aim_params\n", + "\n", + "\n", + "\n", + "N114499->N114516\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114499->N114536\n", + "\n", + "\n", + "INPUT_CALC\n", + "parameters\n", + "\n", + "\n", + "\n", + "N114500\n", + "\n", + "Str (114500)\n", + "output.wfx\n", + "\n", + "\n", + "\n", + "N114500->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "wfx_filename\n", + "\n", + "\n", + "\n", + "N114501\n", + "\n", + "Bool (114501)\n", + "False\n", + "\n", + "\n", + "\n", + "N114501->N114502\n", + "\n", + "\n", + "INPUT_WORK\n", + "dry_run\n", + "\n", + "\n", + "\n", + "N114504\n", + "\n", + "RemoteData (114504)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114503->N114504\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114505\n", + "\n", + "FolderData (114505)\n", + "\n", + "\n", + "\n", + "N114503->N114505\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114506\n", + "\n", + "Dict (114506)\n", + "\n", + "\n", + "\n", + "N114503->N114506\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N114507\n", + "\n", + "Float (114507)\n", + "value: -40.5200702661\n", + "\n", + "\n", + "\n", + "N114503->N114507\n", + "\n", + "\n", + "CREATE\n", + "energy_ev\n", + "\n", + "\n", + "\n", + "N114508\n", + "\n", + "StructureData (114508)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114503->N114508\n", + "\n", + "\n", + "CREATE\n", + "output_structure\n", + "\n", + "\n", + "\n", + "N114505->N114510\n", + "\n", + "\n", + "INPUT_CALC\n", + "retrieved_folder\n", + "\n", + "\n", + "\n", + "N114509\n", + "\n", + "Str (114509)\n", + "output.wfx\n", + "\n", + "\n", + "\n", + "N114509->N114510\n", + "\n", + "\n", + "INPUT_CALC\n", + "wfx_filename\n", + "\n", + "\n", + "\n", + "N114511\n", + "\n", + "SinglefileData (114511)\n", + "file.txt\n", + "\n", + "\n", + "\n", + "N114510->N114511\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114511->N114513\n", + "\n", + "\n", + "INPUT_WORK\n", + "file\n", + "\n", + "\n", + "\n", + "N114511->N114516\n", + "\n", + "\n", + "INPUT_CALC\n", + "file\n", + "\n", + "\n", + "\n", + "N114512\n", + "\n", + "Bool (114512)\n", + "False\n", + "\n", + "\n", + "\n", + "N114512->N114513\n", + "\n", + "\n", + "INPUT_WORK\n", + "dry_run\n", + "\n", + "\n", + "\n", + "N114513->N114516\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114522\n", + "\n", + "generate_rotated_structure_aiida (114522)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114513->N114522\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114524\n", + "\n", + "dict_to_structure (114524)\n", + "State: finished\n", + "Exit Code: 0\n", + "\n", + "\n", + "\n", + "N114513->N114524\n", + "\n", + "\n", + "CALL_CALC\n", + "CALL\n", + "\n", + "\n", + "\n", + "N114525\n", + "\n", + "StructureData (114525)\n", + "CH4\n", + "\n", + "\n", + "\n", + "N114513->N114525\n", + "\n", + "\n", + "RETURN\n", + "rotated_structure\n", + "\n", + "\n", + "\n", + "N114514\n", + "\n", + "Int (114514)\n", + "value: 1\n", + "\n", + "\n", + "\n", + "N114514->N114516\n", + "\n", + "\n", + "INPUT_CALC\n", + "attached_atom_int\n", + "\n", + "\n", + "\n", + "N114515\n", + "\n", + "List (114515)\n", + "\n", + "\n", + "\n", + "N114515->N114516\n", + "\n", + "\n", + "INPUT_CALC\n", + "group_atoms\n", + "\n", + "\n", + "\n", + "N114517\n", + "\n", + "RemoteData (114517)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114516->N114517\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114518\n", + "\n", + "FolderData (114518)\n", + "\n", + "\n", + "\n", + "N114516->N114518\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114519\n", + "\n", + "Dict (114519)\n", + "\n", + "\n", + "\n", + "N114516->N114519\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N114518->N114522\n", + "\n", + "\n", + "INPUT_CALC\n", + "FolderData\n", + "\n", + "\n", + "\n", + "N114520\n", + "\n", + "Dict (114520)\n", + "\n", + "\n", + "\n", + "N114520->N114522\n", + "\n", + "\n", + "INPUT_CALC\n", + "atom_dict\n", + "\n", + "\n", + "\n", + "N114521\n", + "\n", + "Dict (114521)\n", + "\n", + "\n", + "\n", + "N114521->N114522\n", + "\n", + "\n", + "INPUT_CALC\n", + "cc_dict\n", + "\n", + "\n", + "\n", + "N114523\n", + "\n", + "Dict (114523)\n", + "\n", + "\n", + "\n", + "N114522->N114523\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114523->N114524\n", + "\n", + "\n", + "INPUT_CALC\n", + "fragment_dict\n", + "\n", + "\n", + "\n", + "N114524->N114525\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114525->N114526\n", + "\n", + "\n", + "INPUT_CALC\n", + "structure\n", + "\n", + "\n", + "\n", + "N114527\n", + "\n", + "RemoteData (114527)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114526->N114527\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114528\n", + "\n", + "FolderData (114528)\n", + "\n", + "\n", + "\n", + "N114526->N114528\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114529\n", + "\n", + "Dict (114529)\n", + "\n", + "\n", + "\n", + "N114526->N114529\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n", + "N114530\n", + "\n", + "Float (114530)\n", + "value: -40.520069585\n", + "\n", + "\n", + "\n", + "N114526->N114530\n", + "\n", + "\n", + "CREATE\n", + "energy_ev\n", + "\n", + "\n", + "\n", + "N114528->N114532\n", + "\n", + "\n", + "INPUT_CALC\n", + "retrieved_folder\n", + "\n", + "\n", + "\n", + "N114531\n", + "\n", + "Str (114531)\n", + "output.wfx\n", + "\n", + "\n", + "\n", + "N114531->N114532\n", + "\n", + "\n", + "INPUT_CALC\n", + "wfx_filename\n", + "\n", + "\n", + "\n", + "N114533\n", + "\n", + "SinglefileData (114533)\n", + "file.txt\n", + "\n", + "\n", + "\n", + "N114532->N114533\n", + "\n", + "\n", + "CREATE\n", + "result\n", + "\n", + "\n", + "\n", + "N114533->N114536\n", + "\n", + "\n", + "INPUT_CALC\n", + "file\n", + "\n", + "\n", + "\n", + "N114534\n", + "\n", + "List (114534)\n", + "\n", + "\n", + "\n", + "N114534->N114536\n", + "\n", + "\n", + "INPUT_CALC\n", + "group_atoms\n", + "\n", + "\n", + "\n", + "N114535\n", + "\n", + "Int (114535)\n", + "value: 1\n", + "\n", + "\n", + "\n", + "N114535->N114536\n", + "\n", + "\n", + "INPUT_CALC\n", + "attached_atom_int\n", + "\n", + "\n", + "\n", + "N114537\n", + "\n", + "RemoteData (114537)\n", + "@localhost\n", + "\n", + "\n", + "\n", + "N114536->N114537\n", + "\n", + "\n", + "CREATE\n", + "remote_folder\n", + "\n", + "\n", + "\n", + "N114538\n", + "\n", + "FolderData (114538)\n", + "\n", + "\n", + "\n", + "N114536->N114538\n", + "\n", + "\n", + "CREATE\n", + "retrieved\n", + "\n", + "\n", + "\n", + "N114536->N114539\n", + "\n", + "\n", + "CREATE\n", + "output_parameters\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from aiida.tools.visualization import Graph\n", + "graph = Graph(graph_attr={\"size\": \"6,6!\", \"rankdir\": \"LR\"})\n", + "graph = Graph(graph_attr={\"rankdir\": \"LR\"})\n", + "graph.recurse_descendants(\n", + " 114502,\n", + " origin_style=None,\n", + " include_process_inputs=True,\n", + " annotate_links=\"both\"\n", + ")\n", + "graph.graphviz" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "aiida", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/pyproject.toml b/pyproject.toml index eadbdbe..397258f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,8 +35,10 @@ dependencies = [ "multiprocess", "subproptools", "aiida-gaussian", - "pymatgen==2023.12.18", + "pymatgen", "aiida-shell", + "qc-iodata", + "numpy", ] [project.urls] @@ -89,6 +91,8 @@ docs = [ "aimall.subparam" = "aiida_aimall.workchains:SubstituentParameterWorkChain" "aimall.smitog16" = "aiida_aimall.workchains:SmilesToGaussianWorkchain" "aimall.qmtoaim" = "aiida_aimall.workchains:QMToAIMWorkchain" +"aimall.g16toaim" = "aiida_aimall.workchains:GaussianToAIMWorkChain" +"aimall.wfxtoaim" = "aiida_aimall.workchains:GenerateWFXToAIMWorkchain" [tool.flit.module] name = "aiida_aimall" diff --git a/src/aiida_aimall/parsers.py b/src/aiida_aimall/parsers.py index c1c5914..c9b41bf 100644 --- a/src/aiida_aimall/parsers.py +++ b/src/aiida_aimall/parsers.py @@ -5,6 +5,8 @@ Register parsers via the "aiida.parsers" entry point in setup.json. """ +import numpy as np +import pandas as pd from aiida.common import exceptions from aiida.engine import ExitCode from aiida.orm import Dict, SinglefileData @@ -72,6 +74,35 @@ def parse(self, **kwargs): out_dict["cc_properties"] = self._parse_cc_props( out_dict["atomic_properties"] ) + + def make_serializeable(data): + """Recursively go through the dictionary and convert unserializeable values in-place: + + 1) In numpy arrays: + * ``nan`` -> ``0.0`` + * ``inf`` -> large number + + :param data: A mapping of data. + """ + if isinstance(data, dict): + for key, value in data.items(): + data[key] = make_serializeable(value) + elif isinstance(data, list): + for index, item in enumerate(data): + data[index] = make_serializeable(item) + elif isinstance(data, np.ndarray): + np.nan_to_num(data, copy=False) + elif ( + not isinstance(data, dict) + and not isinstance(data, np.ndarray) + and not isinstance(data, list) + and not isinstance(data, pd.DataFrame) + ): + if np.isnan(data): + data = np.nan_to_num(data) + return data + + make_serializeable(out_dict) # store in node self.outputs.output_parameters = Dict(out_dict) diff --git a/src/aiida_aimall/workchains.py b/src/aiida_aimall/workchains.py index e3f534b..358ecb9 100644 --- a/src/aiida_aimall/workchains.py +++ b/src/aiida_aimall/workchains.py @@ -16,7 +16,7 @@ from string import digits import ase.io -from aiida.engine import ToContext, WorkChain, calcfunction +from aiida.engine import ToContext, WorkChain, calcfunction, if_ from aiida.orm import ( Bool, Code, @@ -234,9 +234,10 @@ def get_substituent_input(smiles: str) -> dict: @calcfunction -def generate_structure_data(structure_Str): +def generate_structure_data(smiles_dict): """Take an input xyz string and convert it to StructureData""" - structure_str = structure_Str.value + structure_Str = smiles_dict["xyz"] + structure_str = structure_Str num_atoms = len(structure_str.split("\n")) xyz_string = f"{num_atoms}\n\n" + structure_str f = io.StringIO(xyz_string) @@ -255,6 +256,33 @@ def parameters_with_cm(parameters, smiles_dict): return Dict(parameters_dict) +@calcfunction +def get_wfxname_from_gaussianinputs(gaussian_parameters): + """Look for wfx or wfn objects in the retrieved Folder""" + gaussian_dict = gaussian_parameters.get_dict() + if "input_parameters" not in gaussian_dict: + return Str("") + object_names = list(gaussian_dict["input_parameters"].keys()) + wfx_files = [x for x in object_names if "wfx" in x] + if len(wfx_files) >= 1: + return Str(wfx_files[0]) + if len(wfx_files) == 0: + wfn_files = [x for x in object_names if "wfn" in x] + if len(wfn_files) >= 1: + return Str(wfn_files[0]) + if len(wfn_files) == 0: + return Str("") + # should not get here + return Str("") + + +@calcfunction +def create_wfx_from_retrieved(wfxname, retrieved_folder): + """Create wavefunciton Singlefildata from retrieved folder""" + wfx_file_string = retrieved_folder.get_object_content(wfxname.value) + return SinglefileData(io.BytesIO(wfx_file_string.encode())) + + def validate_shell_code(node, _): """Validate the shell code, ensuring that it is ShellCode or Str""" if node.node_type not in [ @@ -303,6 +331,7 @@ def define(cls, spec): default=lambda: Str("aimall.base"), ) spec.input("dry_run", valid_type=Bool, default=lambda: Bool(False)) + spec.output("parameter_dict", valid_type=Dict) spec.outline(cls.shell_job, cls.aim, cls.result) @@ -363,6 +392,63 @@ def result(self): ) +class GenerateWFXToAIMWorkchain(WorkChain): + """Workchain to generate a wfx file from computational chemistry output files and submit that to an AIMQB Calculation + + Note: + This workchain uses the IOData module of the Ayer's group Horton to generate the wfx files. Supported file formats + include .fchk files, molden files (from Molpro, Orca, PSI4, Turbomole, and Molden), and CP2K atom log files. Further + note that .fchk files can simply be provided directly to an `AimqbCalculation`. + + While IOData accepts other file formats, these formats are the ones available that contain the necessary information + to generate wfc files + """ + + @classmethod + def define(cls, spec): + super().define(spec) + spec.input("input_file", valid_type=SinglefileData) + spec.input("aim_params", valid_type=AimqbParameters) + spec.input("aim_code") + spec.output("output_parameters", valid_type=Dict) + spec.outline(cls.generate_wfx, cls.aim, cls.result) + + def generate_wfx(self): + """Given SinglefileData generates a wfx file if IOData is capable""" + _, node = launch_shell_job( + "iodata-convert", + arguments="{file} output.wfx", + nodes={"file": self.inputs.input_file}, + outputs=["output.wfx"], + submit=True, + ) + out_dict = {"shell_wfx": node} + return ToContext(out_dict) + + def aim(self): + """Run AIM on the generated wfx file""" + builder = AimqbCalculation.get_builder() + builder.parameters = self.inputs.aim_params + builder.file = self.ctx.shell_wfx.base.links.get_outgoing().get_node_by_label( + "output_wfx" + ) + builder.code = self.inputs.aim_code + builder.metadata.options.resources = {"num_machines": 1, "tot_num_mpiprocs": 2} + # generalize for substrates other than H + process_node = self.submit(builder) + out_dict = {"aim": process_node} + return ToContext(out_dict) + + def result(self): + """Put results in output node""" + self.out( + "output_parameters", + self.ctx.aim.base.links.get_outgoing().get_node_by_label( + "output_parameters" + ), + ) + + class SmilesToGaussianWorkchain(WorkChain): """Workchain to take a SMILES, generate xyz, charge, and multiplicity""" @@ -372,19 +458,23 @@ def define(cls, spec): spec.input("smiles") spec.input("gaussian_parameters") spec.input("gaussian_code") + spec.input("wfxname", required=False) spec.input("wfxgroup", required=False) spec.input("nprocs", default=lambda: Int(4)) spec.input("mem_mb", default=lambda: Int(6400)) spec.input("time_s", default=lambda: Int(24 * 7 * 60 * 60)) spec.input("dry_run", default=lambda: Bool(False)) - spec.output("wfx", valid_type=SinglefileData) + spec.output("wfx", valid_type=SinglefileData, required=False) spec.output("output_parameters", valid_type=Dict) # spec.output("g_input") # spec.output("done_smiles") spec.outline( cls.get_substituent_inputs_step, # , cls.results cls.update_parameters_with_cm, + cls.string_to_StructureData, + cls.get_wfx_name, cls.submit_gaussian, + if_(cls.found_wfx_name)(cls.create_wfx_file), cls.results, ) @@ -400,7 +490,16 @@ def update_parameters_with_cm(self): def string_to_StructureData(self): """Convert an xyz string of molecule geometry to StructureData""" - self.ctx.structure = generate_structure_data(self.ctx.smiles_geom["xyz"]) + self.ctx.structure = generate_structure_data(self.ctx.smiles_geom) + + def get_wfx_name(self): + """Find the wavefunction file in the retrieved node""" + if "wfxname" in self.inputs: + self.ctx.wfxname = self.inputs.wfxname + else: + self.ctx.wfxname = get_wfxname_from_gaussianinputs( + self.inputs.gaussian_parameters + ) def submit_gaussian(self): """Submits the gaussian calculation""" @@ -417,6 +516,8 @@ def submit_gaussian(self): int(self.inputs.mem_mb.value * 1.25) * 1024 ) builder.metadata.options.max_wallclock_seconds = self.inputs.time_s.value + if self.ctx.wfxname.value: + builder.metadata.options.additional_retrieve_list = [self.ctx.wfxname.value] if self.inputs.dry_run.value: return self.inputs @@ -424,16 +525,28 @@ def submit_gaussian(self): out_dict = {"opt": node} return ToContext(out_dict) - def results(self): - """Store our relevant information as output""" + def found_wfx_name(self): + """Check if we found a wfx or wfn file""" + if self.ctx.wfxname.value: + return True + return False + + def create_wfx_file(self): + """Create a wavefunction file from the retireved folder""" + retrieved_folder = ( + self.ctx["opt"].base.links.get_outgoing().get_node_by_label("retrieved") + ) + wfx_node = create_wfx_from_retrieved(self.ctx.wfxname, retrieved_folder) + wfx_node.base.extras.set("smiles", self.inputs.smiles) + self.ctx.wfxfile = wfx_node if "wfxgroup" in self.inputs: wfx_group = load_group(self.inputs.wfxgroup.value) - wfx_group.add_nodes( - self.ctx["opt"].base.links.get_outgoing().get_node_by_label("wfx") - ) - self.out( - "wfx", self.ctx["opt"].base.links.get_outgoing().get_node_by_label("wfx") - ) + wfx_group.add_nodes(wfx_node) + + def results(self): + """Store our relevant information as output""" + if "wfxfile" in self.ctx: + self.out("wfx", self.ctx.wfxfile) self.out( "output_parameters", self.ctx["opt"] @@ -475,7 +588,7 @@ def aimall(self): } if self.inputs.dry_run.value: return self.inputs - aim_calc = self.submit(builder, dry_run=self.inputs.dry_run) + aim_calc = self.submit(builder) aim_calc.store() if "aim_group" in self.inputs: aim_noreor_group = load_group(self.inputs.aim_group) @@ -517,6 +630,112 @@ def result(self): self.out("rotated_structure", self.ctx.rot_structure) +@calcfunction +def get_wfx(retrieved_folder, wfx_filename): + """Get a wfx file from retrieved folder""" + folder_data = retrieved_folder + # later scan input parameters for filename + wfx_file = SinglefileData( + io.BytesIO(folder_data.get_object_content(wfx_filename.value).encode()) + ) + return wfx_file + + +class GaussianToAIMWorkChain(WorkChain): + """A workchain to submit a Gaussian calculation and automatically setup an AIMAll calculation on the output""" + + @classmethod + def define(cls, spec): + """Define workchain steps""" + super().define(spec) + spec.input("g16_params", valid_type=Dict, required=True) + spec.input("aim_params", valid_type=AimqbParameters, required=True) + spec.input("structure", valid_type=StructureData, required=True) + spec.input("g16_code", valid_type=Code) + spec.input( + "frag_label", + valid_type=Str, + help="Label for substituent fragment, stored as extra", + required=False, + ) + spec.input("wfx_group", valid_type=Str, required=False) + spec.input("gaussian_group", valid_type=Str, required=False) + spec.input("aim_code", valid_type=Code) + spec.input("dry_run", valid_type=Bool, default=lambda: Bool(False)) + spec.input("wfx_filename", valid_type=Str, default=lambda: Str("output.wfx")) + spec.output("parameter_dict", valid_type=Dict) + spec.outline( + cls.g16, + cls.classify_wfx, + cls.aim, + cls.result, + ) + + def g16(self): + """Run Gaussian calculation""" + builder = GaussianCalculation.get_builder() + builder.structure = self.inputs.structure + builder.parameters = self.inputs.g16_params + builder.code = self.inputs.g16_code + 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 + builder.metadata.options.additional_retrieve_list = [ + self.inputs.wfx_filename.value + ] + if self.inputs.dry_run.value: + return self.inputs + process_node = self.submit(builder) + if "gaussian_group" in self.inputs: + g16_group = load_group(self.inputs.gaussian_sp_group) + g16_group.add_nodes(process_node) + out_dict = {"g16": process_node} + # self.ctx.standard_wfx = process_node.get_outgoing().get_node_by_label("wfx") + return ToContext(out_dict) + + def classify_wfx(self): + """Add the wavefunction file from the previous step to the correct group and set the extras""" + folder_data = self.ctx.g16.base.links.get_outgoing().get_node_by_label( + "retrieved" + ) + self.ctx.wfx = get_wfx(folder_data, self.inputs.wfx_filename) + # later scan input parameters for filename + + if "wfx_group" in self.inputs: + wf_group = load_group(self.inputs.wfx_group) + wf_group.add_nodes(self.ctx.wfx) + if "frag_label" in self.inputs: + struct_extras = EntityExtras(self.ctx.wfx) + struct_extras.set("smiles", self.inputs.frag_label.value) + + def aim(self): + """Run Final AIM Calculation""" + builder = AimqbCalculation.get_builder() + builder.parameters = self.inputs.aim_params + builder.file = self.ctx.wfx + builder.code = self.inputs.aim_code + # if "frag_label" in self.inputs: + # builder.frag_label = self.inputs.frag_label + builder.metadata.options.resources = {"num_machines": 1, "tot_num_mpiprocs": 2} + num_atoms = len(self.inputs.structure.sites) + # generalize for substrates other than H + builder.group_atoms = List([x + 1 for x in range(0, num_atoms) if x != 1]) + if self.inputs.dry_run.value: + return self.inputs + process_node = self.submit(builder) + out_dict = {"aim": process_node} + return ToContext(out_dict) + + def result(self): + """Put results in output node""" + self.out( + "parameter_dict", + self.ctx.aim.base.links.get_outgoing().get_node_by_label( + "output_parameters" + ), + ) + + class SubstituentParameterWorkChain(WorkChain): """A workchain to perform the full suite of KLG's substituent parameter determining""" @@ -539,6 +758,12 @@ def define(cls, spec): spec.input("sp_wfx_group", valid_type=Str, required=False) spec.input("gaussian_opt_group", valid_type=Str, required=False) spec.input("gaussian_sp_group", valid_type=Str, required=False) + spec.input( + "wfx_filename", + valid_type=Str, + required=False, + default=lambda: Str("output.wfx"), + ) # spec.input("file", valid_type=SinglefileData) # spec.output('aim_dict',valid_type=Dict) spec.input("aim_code", valid_type=Code) @@ -565,7 +790,9 @@ def g16_opt(self): 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 - builder.metadata.options.additional_retrieve_list = ["aiida.wfx"] + builder.metadata.options.additional_retrieve_list = [ + self.inputs.wfx_filename.value + ] if self.inputs.dry_run.value: return self.inputs process_node = self.submit(builder) @@ -582,10 +809,7 @@ def classify_opt_wfx(self): "retrieved" ) # later scan input parameters for filename - wfx_file = SinglefileData( - io.BytesIO(folder_data.get_object_content("output.wfx").encode()) - ) - wfx_file.store() + wfx_file = get_wfx(folder_data, self.inputs.wfx_filename.value) self.ctx.opt_wfx = wfx_file if "opt_wfx_group" in self.inputs: @@ -601,7 +825,7 @@ def aim_reor(self): builder.aim_params = self.inputs.aim_params builder.file = self.ctx.opt_wfx builder.aim_code = self.inputs.aim_code - builder.dry_run = self.inputs.dry_run + # builder.dry_run = self.inputs.dry_run if "frag_label" in self.inputs: builder.frag_label = self.inputs.frag_label if self.inputs.dry_run.value: @@ -623,7 +847,9 @@ def g16_sp(self): 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 - builder.metadata.options.additional_retrieve_list = ["output.wfx"] + builder.metadata.options.additional_retrieve_list = [ + self.inputs.wfx_filename.value + ] if self.inputs.dry_run.value: return self.inputs process_node = self.submit(builder) @@ -640,10 +866,7 @@ def classify_sp_wfx(self): "retrieved" ) # later scan input parameters for filename - wfx_file = SinglefileData( - io.BytesIO(folder_data.get_object_content("output.wfx").encode()) - ) - wfx_file.store() + wfx_file = get_wfx(folder_data, self.inputs.wfx_filename.value) self.ctx.sp_wfx = wfx_file if "sp_wfx_group" in self.inputs: diff --git a/tests/conftest.py b/tests/conftest.py index fc35457..6fc1178 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -209,7 +209,7 @@ def _generate_calc_job_node( # pylint:disable=too-many-arguments else: filepath_input = "notestname" entry_point = format_entry_point_string("aiida.calculations", entry_point_name) - + print(filepath_folder) node = orm.CalcJobNode(computer=computer, process_type=entry_point) node.base.attributes.set("input_filename", "aiida.in") node.base.attributes.set("output_filename", "aiida.out") @@ -524,7 +524,7 @@ def _generate_workchain_smitog16( "charge": 0, "multiplicity": 1, "route_parameters": {"opt": None, "Output": "WFX"}, - "input_parameters": {"output.wfx": None}, + "input_parameters": {"aiida.wfx": None}, } ) inputs = { @@ -678,6 +678,100 @@ def _generate_workchain_subparam( return _generate_workchain_subparam +@pytest.fixture +def generate_workchain_g16toaim( + generate_workchain, generate_calc_job_node, fixture_code +): + """Generate an instance of a ``GaussianToAIMWorkChain``.""" + + def _generate_workchain_subparam( + exit_code=None, + inputs=None, + return_inputs=False, + aim_outputs=None, + ): + """Generate an instance of a ``GaussianToAIMWorkChain``. + + :param exit_code: exit code for the ``GaussianToAIMWorkChain``. + :param inputs: inputs for the ``GaussianToAIMWorkChain``. + :param return_inputs: return the inputs of the ``GaussianToAIMWorkChain``. + :param pw_outputs: ``dict`` of outputs for the ``GaussianToAIMWorkChain``. + The keys must correspond to the link labels and the values to the output nodes. + """ + # pylint:disable=too-many-locals + from aiida.common import LinkType + from plumpy import ProcessState + + entry_point = "aimall.g16toaim" + + if inputs is None: + gaussian_input = 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}, + } + ) + + f = io.StringIO( + "5\n\n C -0.1 2.0 -0.02\nH 0.3 1.0 -0.02\nH 0.3 2.5 0.8\nH 0.3 2.5 -0.9\nH -1.2 2.0 -0.02" + ) + struct_data = StructureData(ase=ase.io.read(f, format="xyz")) + f.close() + aiminputs = AimqbParameters({"naat": 2, "nproc": 2, "atlaprhocps": True}) + inputs = { + "g16_params": gaussian_input, + "aim_params": aiminputs, + "structure": struct_data, + "g16_code": fixture_code("gaussian"), + "frag_label": Str("*C"), + # "opt_wfx_group": Str("group1"), + # "sp_wfx_group": Str("group2"), + # "gaussian_opt_group": Str("group3"), + # "gaussian_sp_group": Str("group4"), + "aim_code": fixture_code("aimall"), + "dry_run": Bool(True), + } + + if return_inputs: + return inputs + + process = generate_workchain(entry_point, inputs) + + gaussian_node = generate_calc_job_node(inputs={"parameters": Dict()}) + + aim_node = generate_calc_job_node(inputs={"parameters": Dict()}) + + process.ctx.children = [ + gaussian_node, + aim_node, + ] + + if aim_outputs is not None: + for link_label, output_node in aim_outputs.items(): + output_node.base.links.add_incoming( + aim_node, link_type=LinkType.CREATE, link_label=link_label + ) + output_node.store() + + if exit_code is not None: + gaussian_node.set_process_state(ProcessState.FINISHED) + gaussian_node.set_exit_status(exit_code.status) + aim_node.set_process_state(ProcessState.FINISHED) + aim_node.set_exit_status(exit_code.status) + return process + + return _generate_workchain_subparam + + @pytest.fixture def generate_workchain_qmtoaim( generate_workchain, generate_calc_job_node, filepath_tests, fixture_code diff --git a/tests/workchains/fixtures/gaussian/default/aiida.chk b/tests/workchains/fixtures/gaussian/default/aiida.chk new file mode 100644 index 0000000..f0f4255 Binary files /dev/null and b/tests/workchains/fixtures/gaussian/default/aiida.chk differ diff --git a/tests/workchains/fixtures/gaussian/default/aiida.gjf b/tests/workchains/fixtures/gaussian/default/aiida.gjf new file mode 100644 index 0000000..2fb4d05 --- /dev/null +++ b/tests/workchains/fixtures/gaussian/default/aiida.gjf @@ -0,0 +1,15 @@ +%chk=aiida.chk +# opt freq hf/3-21g output=wfx + +Title Card Required + +0 1 + C -0.10355030 2.04124515 -0.02672136 + H 0.25310413 1.03243515 -0.02672136 + H 0.25312254 2.54564334 0.84693014 + H 0.25312254 2.54564334 -0.90037287 + H -1.17355030 2.04125834 -0.02672136 + +aiida.wfx + +aiida.wfx diff --git a/tests/workchains/fixtures/gaussian/default/aiida.log b/tests/workchains/fixtures/gaussian/default/aiida.log new file mode 100644 index 0000000..49c5fc3 --- /dev/null +++ b/tests/workchains/fixtures/gaussian/default/aiida.log @@ -0,0 +1,1405 @@ + Entering Gaussian System, Link 0=/Users/chemlab/Desktop/g16/g16 + Input=/Users/chemlab/Desktop/junkCalculations/aiida.gjf + Output=/Users/chemlab/Desktop/junkCalculations/aiida.log + Initial command: + /Users/chemlab/Desktop/g16/l1.exe "/Users/chemlab/GaussianScratch/Gau-52069.inp" -scrdir="/Users/chemlab/GaussianScratch/" + Entering Link 1 = /Users/chemlab/Desktop/g16/l1.exe PID= 52070. + + Copyright (c) 1988-2021, Gaussian, Inc. All Rights Reserved. + + This is part of the Gaussian(R) 16 program. It is based on + the Gaussian(R) 09 system (copyright 2009, Gaussian, Inc.), + the Gaussian(R) 03 system (copyright 2003, Gaussian, Inc.), + the Gaussian(R) 98 system (copyright 1998, Gaussian, Inc.), + the Gaussian(R) 94 system (copyright 1995, Gaussian, Inc.), + the Gaussian 92(TM) system (copyright 1992, Gaussian, Inc.), + the Gaussian 90(TM) system (copyright 1990, Gaussian, Inc.), + the Gaussian 88(TM) system (copyright 1988, Gaussian, Inc.), + the Gaussian 86(TM) system (copyright 1986, Carnegie Mellon + University), and the Gaussian 82(TM) system (copyright 1983, + Carnegie Mellon University). Gaussian is a federally registered + trademark of Gaussian, Inc. + + This software contains proprietary and confidential information, + including trade secrets, belonging to Gaussian, Inc. + + This software is provided under written license and may be + used, copied, transmitted, or stored only in accord with that + written license. + + The following legend is applicable only to US Government + contracts under FAR: + + RESTRICTED RIGHTS LEGEND + + Use, reproduction and disclosure by the US Government is + subject to restrictions as set forth in subparagraphs (a) + and (c) of the Commercial Computer Software - Restricted + Rights clause in FAR 52.227-19. + + Gaussian, Inc. + 340 Quinnipiac St., Bldg. 40, Wallingford CT 06492 + + + --------------------------------------------------------------- + Warning -- This program may not be used in any manner that + competes with the business of Gaussian, Inc. or will provide + assistance to any competitor of Gaussian, Inc. The licensee + of this program is prohibited from giving any competitor of + Gaussian, Inc. access to this program. By using this program, + the user acknowledges that Gaussian, Inc. is engaged in the + business of creating and licensing software in the field of + computational chemistry and represents and warrants to the + licensee that it is not a competitor of Gaussian, Inc. and that + it will not use this program in any manner prohibited above. + --------------------------------------------------------------- + + + Cite this work as: + Gaussian 16, Revision C.02, + M. J. Frisch, G. W. Trucks, H. B. Schlegel, G. E. Scuseria, + M. A. Robb, J. R. Cheeseman, G. Scalmani, V. Barone, + G. A. Petersson, H. Nakatsuji, X. Li, M. Caricato, A. V. Marenich, + J. Bloino, B. G. Janesko, R. Gomperts, B. Mennucci, H. P. Hratchian, + J. V. Ortiz, A. F. Izmaylov, J. L. Sonnenberg, D. Williams-Young, + F. Ding, F. Lipparini, F. Egidi, J. Goings, B. Peng, A. Petrone, + T. Henderson, D. Ranasinghe, V. G. Zakrzewski, J. Gao, N. Rega, + G. Zheng, W. Liang, M. Hada, M. Ehara, K. Toyota, R. Fukuda, + J. Hasegawa, M. Ishida, T. Nakajima, Y. Honda, O. Kitao, H. Nakai, + T. Vreven, K. Throssell, J. A. Montgomery, Jr., J. E. Peralta, + F. Ogliaro, M. J. Bearpark, J. J. Heyd, E. N. Brothers, K. N. Kudin, + V. N. Staroverov, T. A. Keith, R. Kobayashi, J. Normand, + K. Raghavachari, A. P. Rendell, J. C. Burant, S. S. Iyengar, + J. Tomasi, M. Cossi, J. M. Millam, M. Klene, C. Adamo, R. Cammi, + J. W. Ochterski, R. L. Martin, K. Morokuma, O. Farkas, + J. B. Foresman, and D. J. Fox, Gaussian, Inc., Wallingford CT, 2019. + + ********************************************* + Gaussian 16: M1-G16RevC.02 7-Dec-2021 + 16-Jul-2024 + ********************************************* + %chk=aiida.chk + ------------------------------ + # opt freq hf/3-21g output=wfx + ------------------------------ + 1/18=20,19=15,38=1/1,3; + 2/9=110,12=2,17=6,18=5,40=1/2; + 3/5=5,11=9,25=1,30=1,71=1/1,2,3; + 4//1; + 5/5=2,38=5/2; + 6/7=2,8=2,9=2,10=2,28=1/1; + 7//1,2,3,16; + 1/18=20,19=15/3(2); + 2/9=110/2; + 99/6=200/99; + 2/9=110/2; + 3/5=5,11=9,25=1,30=1,71=1/1,2,3; + 4/5=5,16=3,69=1/1; + 5/5=2,38=5/2; + 7//1,2,3,16; + 1/18=20,19=15/3(-5); + 2/9=110/2; + 6/7=2,8=2,9=2,10=2,19=2,28=1/1; + 99/6=200,9=1/99; + ------------------- + Title Card Required + ------------------- + Symbolic Z-matrix: + Charge = 0 Multiplicity = 1 + C -0.10355 2.04125 -0.02672 + H 0.2531 1.03244 -0.02672 + H 0.25312 2.54564 0.84693 + H 0.25312 2.54564 -0.90037 + H -1.17355 2.04126 -0.02672 + + + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + Berny optimization. + Initialization pass. + ---------------------------- + ! Initial Parameters ! + ! (Angstroms and Degrees) ! + -------------------------- -------------------------- + ! Name Definition Value Derivative Info. ! + -------------------------------------------------------------------------------- + ! R1 R(1,2) 1.07 estimate D2E/DX2 ! + ! R2 R(1,3) 1.07 estimate D2E/DX2 ! + ! R3 R(1,4) 1.07 estimate D2E/DX2 ! + ! R4 R(1,5) 1.07 estimate D2E/DX2 ! + ! A1 A(2,1,3) 109.4712 estimate D2E/DX2 ! + ! A2 A(2,1,4) 109.4712 estimate D2E/DX2 ! + ! A3 A(2,1,5) 109.4712 estimate D2E/DX2 ! + ! A4 A(3,1,4) 109.4713 estimate D2E/DX2 ! + ! A5 A(3,1,5) 109.4712 estimate D2E/DX2 ! + ! A6 A(4,1,5) 109.4712 estimate D2E/DX2 ! + ! D1 D(2,1,4,3) -120.0 estimate D2E/DX2 ! + ! D2 D(2,1,5,3) 120.0 estimate D2E/DX2 ! + ! D3 D(2,1,5,4) -120.0 estimate D2E/DX2 ! + ! D4 D(3,1,5,4) 120.0 estimate D2E/DX2 ! + -------------------------------------------------------------------------------- + Trust Radius=3.00D-01 FncErr=1.00D-07 GrdErr=1.00D-07 EigMax=2.50D+02 EigMin=1.00D-04 + Number of steps in this run= 24 maximum allowed number of steps= 100. + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + + Input orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 -0.103550 2.041245 -0.026721 + 2 1 0 0.253104 1.032435 -0.026721 + 3 1 0 0.253123 2.545643 0.846930 + 4 1 0 0.253123 2.545643 -0.900373 + 5 1 0 -1.173550 2.041258 -0.026721 + --------------------------------------------------------------------- + Distance matrix (angstroms): + 1 2 3 4 5 + 1 C 0.000000 + 2 H 1.070000 0.000000 + 3 H 1.070000 1.747302 0.000000 + 4 H 1.070000 1.747302 1.747303 0.000000 + 5 H 1.070000 1.747303 1.747303 1.747303 0.000000 + Stoichiometry CH4 + Framework group T[O(C),4C3(H)] + Deg. of freedom 1 + Full point group T NOp 12 + Largest Abelian subgroup D2 NOp 4 + Largest concise Abelian subgroup D2 NOp 4 + Standard orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 0.000000 -0.000000 0.000000 + 2 1 0 0.617765 0.617765 0.617765 + 3 1 0 -0.617765 -0.617765 0.617765 + 4 1 0 -0.617765 0.617765 -0.617765 + 5 1 0 0.617765 -0.617765 -0.617765 + --------------------------------------------------------------------- + Rotational constants (GHZ): 164.2463796 164.2463796 164.2463796 + Standard basis: 3-21G (6D, 7F) + There are 5 symmetry adapted cartesian basis functions of A symmetry. + There are 4 symmetry adapted cartesian basis functions of B1 symmetry. + There are 4 symmetry adapted cartesian basis functions of B2 symmetry. + There are 4 symmetry adapted cartesian basis functions of B3 symmetry. + There are 5 symmetry adapted basis functions of A symmetry. + There are 4 symmetry adapted basis functions of B1 symmetry. + There are 4 symmetry adapted basis functions of B2 symmetry. + There are 4 symmetry adapted basis functions of B3 symmetry. + 17 basis functions, 27 primitive gaussians, 17 cartesian basis functions + 5 alpha electrons 5 beta electrons + nuclear repulsion energy 13.6865185999 Hartrees. + NAtoms= 5 NActive= 5 NUniq= 2 SFac= 4.00D+00 NAtFMM= 60 NAOKFM=F Big=F + Integral buffers will be 131072 words long. + Raffenetti 1 integral format. + Two-electron integral symmetry is turned on. + One-electron integrals computed using PRISM. + NBasis= 17 RedAO= T EigKep= 3.16D-02 NBF= 5 4 4 4 + NBsUse= 17 1.00D-06 EigRej= -1.00D+00 NBFU= 5 4 4 4 + ExpMin= 1.83D-01 ExpMax= 1.72D+02 ExpMxC= 1.72D+02 IAcc=3 IRadAn= 5 AccDes= 0.00D+00 + Harris functional with IExCor= 205 and IRadAn= 5 diagonalized for initial guess. + HarFok: IExCor= 205 AccDes= 0.00D+00 IRadAn= 5 IDoV= 1 UseB2=F ITyADJ=14 + ICtDFT= 3500011 ScaDFX= 1.000000 1.000000 1.000000 1.000000 + FoFCou: FMM=F IPFlag= 0 FMFlag= 100000 FMFlg1= 0 + NFxFlg= 0 DoJE=T BraDBF=F KetDBF=T FulRan=T + wScrn= 0.000000 ICntrl= 500 IOpCl= 0 I1Cent= 200000004 NGrid= 0 + NMat0= 1 NMatS0= 1 NMatT0= 0 NMatD0= 1 NMtDS0= 0 NMtDT0= 0 + Petite list used in FoFCou. + Initial guess orbital symmetries: + Occupied (A) (A) (T) (T) (T) + Virtual (A) (T) (T) (T) (T) (T) (T) (A) (T) (T) (T) (A) + The electronic state of the initial guess is 1-A. + Keep R1 ints in memory in symmetry-blocked form, NReq=817492. + Requested convergence on RMS density matrix=1.00D-08 within 128 cycles. + Requested convergence on MAX density matrix=1.00D-06. + Requested convergence on energy=1.00D-06. + No special actions if energy rises. + SCF Done: E(RHF) = -39.9764058482 A.U. after 8 cycles + NFock= 8 Conv=0.25D-09 -V/T= 2.0003 + + ********************************************************************** + + Population analysis using the SCF Density. + + ********************************************************************** + + Orbital symmetries: + Occupied (A) (A) (T) (T) (T) + Virtual (A) (T) (T) (T) (T) (T) (T) (A) (T) (T) (T) (A) + The electronic state is 1-A. + Alpha occ. eigenvalues -- -11.13826 -0.95125 -0.54830 -0.54830 -0.54830 + Alpha virt. eigenvalues -- 0.30001 0.35670 0.35670 0.35670 0.91538 + Alpha virt. eigenvalues -- 0.91538 0.91538 1.35396 1.37170 1.37170 + Alpha virt. eigenvalues -- 1.37170 1.96130 + Condensed to atoms (all electrons): + 1 2 3 4 5 + 1 C 5.313108 0.372312 0.372312 0.372312 0.372312 + 2 H 0.372312 0.505758 -0.026219 -0.026219 -0.026219 + 3 H 0.372312 -0.026219 0.505758 -0.026219 -0.026219 + 4 H 0.372312 -0.026219 -0.026219 0.505758 -0.026219 + 5 H 0.372312 -0.026219 -0.026219 -0.026219 0.505758 + Mulliken charges: + 1 + 1 C -0.802355 + 2 H 0.200589 + 3 H 0.200589 + 4 H 0.200589 + 5 H 0.200589 + Sum of Mulliken charges = -0.00000 + Mulliken charges with hydrogens summed into heavy atoms: + 1 + 1 C -0.000000 + Electronic spatial extent (au): = 34.9949 + Charge= -0.0000 electrons + Dipole moment (field-independent basis, Debye): + X= 0.0000 Y= 0.0000 Z= 0.0000 Tot= 0.0000 + Quadrupole moment (field-independent basis, Debye-Ang): + XX= -8.3575 YY= -8.3575 ZZ= -8.3575 + XY= 0.0000 XZ= 0.0000 YZ= -0.0000 + Traceless Quadrupole moment (field-independent basis, Debye-Ang): + XX= 0.0000 YY= 0.0000 ZZ= -0.0000 + XY= 0.0000 XZ= 0.0000 YZ= -0.0000 + Octapole moment (field-independent basis, Debye-Ang**2): + XXX= 0.0000 YYY= 0.0000 ZZZ= 0.0000 XYY= -0.0000 + XXY= -0.0000 XXZ= 0.0000 XZZ= -0.0000 YZZ= 0.0000 + YYZ= 0.0000 XYZ= 0.6836 + Hexadecapole moment (field-independent basis, Debye-Ang**3): + XXXX= -15.0377 YYYY= -15.0377 ZZZZ= -15.0377 XXXY= -0.0000 + XXXZ= -0.0000 YYYX= -0.0000 YYYZ= 0.0000 ZZZX= 0.0000 + ZZZY= 0.0000 XXYY= -4.5929 XXZZ= -4.5929 YYZZ= -4.5929 + XXYZ= 0.0000 YYXZ= -0.0000 ZZXY= -0.0000 + N-N= 1.368651859988D+01 E-N=-1.198200652354D+02 KE= 3.996302504387D+01 + Symmetry A KE= 3.424875328667D+01 + Symmetry B1 KE= 1.904757252399D+00 + Symmetry B2 KE= 1.904757252399D+00 + Symmetry B3 KE= 1.904757252399D+00 + Calling FoFJK, ICntrl= 2127 FMM=F ISym2X=1 I1Cent= 0 IOpClX= 0 NMat=1 NMatS=1 NMatT=0. + ***** Axes restored to original set ***** + ------------------------------------------------------------------- + Center Atomic Forces (Hartrees/Bohr) + Number Number X Y Z + ------------------------------------------------------------------- + 1 6 -0.000000000 0.000000000 -0.000000000 + 2 1 0.003263589 -0.009231179 -0.000000008 + 3 1 0.003263763 0.004615526 0.007994401 + 4 1 0.003263750 0.004615535 -0.007994401 + 5 1 -0.009791102 0.000000119 0.000000008 + ------------------------------------------------------------------- + Cartesian Forces: Max 0.009791102 RMS 0.005056103 + + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + Berny optimization. + FormGI is forming the generalized inverse of G from B-inverse, IUseBI=4. + Internal Forces: Max 0.009791102 RMS 0.005233564 + Search for a local minimum. + Step number 1 out of a maximum of 24 + All quantities printed in internal units (Hartrees-Bohrs-Radians) + Mixed Optimization -- RFO/linear search + Second derivative matrix not updated -- first step. + The second derivative matrix: + R1 R2 R3 R4 A1 + R1 0.37230 + R2 0.00000 0.37230 + R3 0.00000 0.00000 0.37230 + R4 0.00000 0.00000 0.00000 0.37230 + A1 0.00000 0.00000 0.00000 0.00000 0.16000 + A2 0.00000 0.00000 0.00000 0.00000 0.00000 + A3 0.00000 0.00000 0.00000 0.00000 0.00000 + A4 0.00000 0.00000 0.00000 0.00000 0.00000 + A5 0.00000 0.00000 0.00000 0.00000 0.00000 + A6 0.00000 0.00000 0.00000 0.00000 0.00000 + D1 0.00000 0.00000 0.00000 0.00000 0.00000 + D2 0.00000 0.00000 0.00000 0.00000 0.00000 + D3 0.00000 0.00000 0.00000 0.00000 0.00000 + D4 0.00000 0.00000 0.00000 0.00000 0.00000 + A2 A3 A4 A5 A6 + A2 0.16000 + A3 0.00000 0.16000 + A4 0.00000 0.00000 0.16000 + A5 0.00000 0.00000 0.00000 0.16000 + A6 0.00000 0.00000 0.00000 0.00000 0.16000 + D1 0.00000 0.00000 0.00000 0.00000 0.00000 + D2 0.00000 0.00000 0.00000 0.00000 0.00000 + D3 0.00000 0.00000 0.00000 0.00000 0.00000 + D4 0.00000 0.00000 0.00000 0.00000 0.00000 + D1 D2 D3 D4 + D1 0.00499 + D2 0.00000 0.00499 + D3 0.00000 0.00000 0.00499 + D4 0.00000 0.00000 0.00000 0.00499 + ITU= 0 + Eigenvalues --- 0.05269 0.05891 0.08766 0.16000 0.16000 + Eigenvalues --- 0.37230 0.37230 0.37230 0.37230 + RFO step: Lambda=-1.02713849D-03 EMin= 5.26881011D-02 + Linear search not attempted -- first point. + Iteration 1 RMS(Cart)= 0.01401867 RMS(Int)= 0.00000000 + Iteration 2 RMS(Cart)= 0.00000000 RMS(Int)= 0.00000000 + ClnCor: largest displacement from symmetrization is 1.56D-14 for atom 5. + Variable Old X -DE/DX Delta X Delta X Delta X New X + (Linear) (Quad) (Total) + R1 2.02201 0.00979 0.00000 0.02623 0.02623 2.04823 + R2 2.02201 0.00979 0.00000 0.02623 0.02623 2.04823 + R3 2.02201 0.00979 0.00000 0.02623 0.02623 2.04823 + R4 2.02201 0.00979 0.00000 0.02623 0.02623 2.04823 + A1 1.91063 -0.00000 0.00000 -0.00000 0.00000 1.91063 + A2 1.91063 -0.00000 0.00000 -0.00000 0.00000 1.91063 + A3 1.91063 0.00000 0.00000 0.00000 0.00000 1.91063 + A4 1.91063 -0.00000 0.00000 -0.00000 -0.00000 1.91063 + A5 1.91063 0.00000 0.00000 0.00000 0.00000 1.91063 + A6 1.91063 -0.00000 0.00000 0.00000 0.00000 1.91063 + D1 -2.09440 0.00000 0.00000 0.00000 -0.00000 -2.09440 + D2 2.09440 -0.00000 0.00000 -0.00000 0.00000 2.09440 + D3 -2.09440 0.00000 0.00000 0.00000 -0.00000 -2.09440 + D4 2.09440 0.00000 0.00000 0.00000 -0.00000 2.09440 + Item Value Threshold Converged? + Maximum Force 0.009791 0.000450 NO + RMS Force 0.005234 0.000300 NO + Maximum Displacement 0.026227 0.001800 NO + RMS Displacement 0.014019 0.001200 NO + Predicted change in Energy=-5.149861D-04 + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + + Input orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 -0.103550 2.041245 -0.026721 + 2 1 0 0.257730 1.019350 -0.026722 + 3 1 0 0.257749 2.552185 0.858262 + 4 1 0 0.257748 2.552186 -0.911704 + 5 1 0 -1.187429 2.041258 -0.026720 + --------------------------------------------------------------------- + Distance matrix (angstroms): + 1 2 3 4 5 + 1 C 0.000000 + 2 H 1.083878 0.000000 + 3 H 1.083878 1.769966 0.000000 + 4 H 1.083878 1.769966 1.769966 0.000000 + 5 H 1.083878 1.769966 1.769966 1.769966 0.000000 + Stoichiometry CH4 + Framework group TD[O(C),4C3(H)] + Deg. of freedom 1 + Full point group TD NOp 24 + Omega: Change in point group or standard orientation. + + Old FWG=T [O(C1),4C3(H1)] + New FWG=TD [O(C1),4C3(H1)] + Largest Abelian subgroup D2 NOp 4 + Largest concise Abelian subgroup D2 NOp 4 + Standard orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 0.000000 0.000000 0.000000 + 2 1 0 0.625778 0.625778 0.625778 + 3 1 0 -0.625778 -0.625778 0.625778 + 4 1 0 -0.625778 0.625778 -0.625778 + 5 1 0 0.625778 -0.625778 -0.625778 + --------------------------------------------------------------------- + Rotational constants (GHZ): 160.0671358 160.0671358 160.0671358 + Standard basis: 3-21G (6D, 7F) + There are 5 symmetry adapted cartesian basis functions of A symmetry. + There are 4 symmetry adapted cartesian basis functions of B1 symmetry. + There are 4 symmetry adapted cartesian basis functions of B2 symmetry. + There are 4 symmetry adapted cartesian basis functions of B3 symmetry. + There are 5 symmetry adapted basis functions of A symmetry. + There are 4 symmetry adapted basis functions of B1 symmetry. + There are 4 symmetry adapted basis functions of B2 symmetry. + There are 4 symmetry adapted basis functions of B3 symmetry. + 17 basis functions, 27 primitive gaussians, 17 cartesian basis functions + 5 alpha electrons 5 beta electrons + nuclear repulsion energy 13.5112701092 Hartrees. + NAtoms= 5 NActive= 5 NUniq= 2 SFac= 4.00D+00 NAtFMM= 60 NAOKFM=F Big=F + Integral buffers will be 131072 words long. + Raffenetti 1 integral format. + Two-electron integral symmetry is turned on. + One-electron integrals computed using PRISM. + NBasis= 17 RedAO= T EigKep= 3.31D-02 NBF= 5 4 4 4 + NBsUse= 17 1.00D-06 EigRej= -1.00D+00 NBFU= 5 4 4 4 + Initial guess from the checkpoint file: "aiida.chk" + B after Tr= -0.000000 -0.000000 -0.000000 + Rot= 1.000000 -0.000000 -0.000000 0.000000 Ang= 0.00 deg. + Initial guess orbital symmetries: + Occupied (A1) (A1) (T2) (T2) (T2) + Virtual (A1) (T2) (T2) (T2) (T2) (T2) (T2) (A1) (T2) (T2) + (T2) (A1) + ExpMin= 1.83D-01 ExpMax= 1.72D+02 ExpMxC= 1.72D+02 IAcc=3 IRadAn= 5 AccDes= 0.00D+00 + Harris functional with IExCor= 205 and IRadAn= 5 diagonalized for initial guess. + HarFok: IExCor= 205 AccDes= 0.00D+00 IRadAn= 5 IDoV= 1 UseB2=F ITyADJ=14 + ICtDFT= 3500011 ScaDFX= 1.000000 1.000000 1.000000 1.000000 + FoFCou: FMM=F IPFlag= 0 FMFlag= 100000 FMFlg1= 0 + NFxFlg= 0 DoJE=T BraDBF=F KetDBF=T FulRan=T + wScrn= 0.000000 ICntrl= 500 IOpCl= 0 I1Cent= 200000004 NGrid= 0 + NMat0= 1 NMatS0= 1 NMatT0= 0 NMatD0= 1 NMtDS0= 0 NMtDT0= 0 + Petite list used in FoFCou. + Keep R1 ints in memory in symmetry-blocked form, NReq=817624. + Requested convergence on RMS density matrix=1.00D-08 within 128 cycles. + Requested convergence on MAX density matrix=1.00D-06. + Requested convergence on energy=1.00D-06. + No special actions if energy rises. + SCF Done: E(RHF) = -39.9768749251 A.U. after 7 cycles + NFock= 7 Conv=0.75D-08 -V/T= 2.0024 + Calling FoFJK, ICntrl= 2127 FMM=F ISym2X=1 I1Cent= 0 IOpClX= 0 NMat=1 NMatS=1 NMatT=0. + ***** Axes restored to original set ***** + ------------------------------------------------------------------- + Center Atomic Forces (Hartrees/Bohr) + Number Number X Y Z + ------------------------------------------------------------------- + 1 6 -0.000000000 0.000000000 0.000000000 + 2 1 -0.000237680 0.000672287 0.000000001 + 3 1 -0.000237693 -0.000336139 -0.000582215 + 4 1 -0.000237692 -0.000336140 0.000582215 + 5 1 0.000713065 -0.000000009 -0.000000001 + ------------------------------------------------------------------- + Cartesian Forces: Max 0.000713065 RMS 0.000368225 + + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + Berny optimization. + Using GEDIIS/GDIIS optimizer. + FormGI is forming the generalized inverse of G from B-inverse, IUseBI=4. + Internal Forces: Max 0.000713065 RMS 0.000381149 + Search for a local minimum. + Step number 2 out of a maximum of 24 + All quantities printed in internal units (Hartrees-Bohrs-Radians) + Mixed Optimization -- En-DIIS/RFO-DIIS + Update second derivatives using D2CorX and points 1 2 + DE= -4.69D-04 DEPred=-5.15D-04 R= 9.11D-01 + TightC=F SS= 1.41D+00 RLast= 5.25D-02 DXNew= 5.0454D-01 1.5736D-01 + Trust test= 9.11D-01 RLast= 5.25D-02 DXMaxT set to 3.00D-01 + The second derivative matrix: + R1 R2 R3 R4 A1 + R1 0.37936 + R2 0.00705 0.37936 + R3 0.00705 0.00705 0.37936 + R4 0.00705 0.00705 0.00705 0.37936 + A1 0.00000 0.00000 0.00000 0.00000 0.16000 + A2 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 + A3 0.00000 0.00000 0.00000 0.00000 0.00000 + A4 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 + A5 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 + A6 0.00000 0.00000 0.00000 0.00000 0.00000 + D1 0.00000 0.00000 0.00000 0.00000 0.00000 + D2 0.00000 0.00000 0.00000 0.00000 0.00000 + D3 0.00000 0.00000 0.00000 0.00000 0.00000 + D4 0.00000 0.00000 0.00000 0.00000 0.00000 + A2 A3 A4 A5 A6 + A2 0.16000 + A3 -0.00000 0.16000 + A4 0.00000 -0.00000 0.16000 + A5 0.00000 -0.00000 0.00000 0.16000 + A6 -0.00000 0.00000 -0.00000 -0.00000 0.16000 + D1 -0.00000 0.00000 -0.00000 -0.00000 0.00000 + D2 -0.00000 0.00000 -0.00000 -0.00000 0.00000 + D3 -0.00000 0.00000 -0.00000 -0.00000 0.00000 + D4 -0.00000 0.00000 -0.00000 -0.00000 0.00000 + D1 D2 D3 D4 + D1 0.00499 + D2 0.00000 0.00499 + D3 0.00000 0.00000 0.00499 + D4 0.00000 0.00000 0.00000 0.00499 + ITU= 1 0 + Use linear search instead of GDIIS. + Eigenvalues --- 0.05269 0.05891 0.08766 0.16000 0.16000 + Eigenvalues --- 0.37230 0.37230 0.37230 0.40052 + RFO step: Lambda= 0.00000000D+00 EMin= 5.26881011D-02 + Quartic linear search produced a step of -0.07040. + Iteration 1 RMS(Cart)= 0.00098688 RMS(Int)= 0.00000000 + Iteration 2 RMS(Cart)= 0.00000000 RMS(Int)= 0.00000000 + ClnCor: largest displacement from symmetrization is 2.26D-14 for atom 3. + Variable Old X -DE/DX Delta X Delta X Delta X New X + (Linear) (Quad) (Total) + R1 2.04823 -0.00071 -0.00185 -0.00000 -0.00185 2.04639 + R2 2.04823 -0.00071 -0.00185 -0.00000 -0.00185 2.04639 + R3 2.04823 -0.00071 -0.00185 -0.00000 -0.00185 2.04639 + R4 2.04823 -0.00071 -0.00185 0.00000 -0.00185 2.04639 + A1 1.91063 -0.00000 -0.00000 -0.00000 0.00000 1.91063 + A2 1.91063 0.00000 0.00000 0.00000 0.00000 1.91063 + A3 1.91063 0.00000 -0.00000 0.00000 0.00000 1.91063 + A4 1.91063 0.00000 -0.00000 0.00000 0.00000 1.91063 + A5 1.91063 0.00000 0.00000 0.00000 -0.00000 1.91063 + A6 1.91063 -0.00000 -0.00000 -0.00000 0.00000 1.91063 + D1 -2.09440 0.00000 0.00000 0.00000 0.00000 -2.09440 + D2 2.09440 -0.00000 -0.00000 -0.00000 -0.00000 2.09440 + D3 -2.09440 -0.00000 -0.00000 -0.00000 -0.00000 -2.09440 + D4 2.09440 0.00000 0.00000 0.00000 0.00000 2.09440 + Item Value Threshold Converged? + Maximum Force 0.000713 0.000450 NO + RMS Force 0.000381 0.000300 NO + Maximum Displacement 0.001846 0.001800 NO + RMS Displacement 0.000987 0.001200 YES + Predicted change in Energy=-2.535547D-06 + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + + Input orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 -0.103550 2.041245 -0.026721 + 2 1 0 0.257404 1.020271 -0.026722 + 3 1 0 0.257424 2.551725 0.857464 + 4 1 0 0.257422 2.551726 -0.910907 + 5 1 0 -1.186452 2.041258 -0.026720 + --------------------------------------------------------------------- + Distance matrix (angstroms): + 1 2 3 4 5 + 1 C 0.000000 + 2 H 1.082901 0.000000 + 3 H 1.082901 1.768371 0.000000 + 4 H 1.082901 1.768371 1.768371 0.000000 + 5 H 1.082901 1.768371 1.768371 1.768371 0.000000 + Stoichiometry CH4 + Framework group TD[O(C),4C3(H)] + Deg. of freedom 1 + Full point group TD NOp 24 + Largest Abelian subgroup D2 NOp 4 + Largest concise Abelian subgroup D2 NOp 4 + Standard orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 0.000000 0.000000 0.000000 + 2 1 0 0.625213 0.625213 0.625213 + 3 1 0 -0.625213 -0.625213 0.625213 + 4 1 0 -0.625213 0.625213 -0.625213 + 5 1 0 0.625213 -0.625213 -0.625213 + --------------------------------------------------------------------- + Rotational constants (GHZ): 160.3560971 160.3560971 160.3560971 + Standard basis: 3-21G (6D, 7F) + There are 5 symmetry adapted cartesian basis functions of A symmetry. + There are 4 symmetry adapted cartesian basis functions of B1 symmetry. + There are 4 symmetry adapted cartesian basis functions of B2 symmetry. + There are 4 symmetry adapted cartesian basis functions of B3 symmetry. + There are 5 symmetry adapted basis functions of A symmetry. + There are 4 symmetry adapted basis functions of B1 symmetry. + There are 4 symmetry adapted basis functions of B2 symmetry. + There are 4 symmetry adapted basis functions of B3 symmetry. + 17 basis functions, 27 primitive gaussians, 17 cartesian basis functions + 5 alpha electrons 5 beta electrons + nuclear repulsion energy 13.5234602235 Hartrees. + NAtoms= 5 NActive= 5 NUniq= 2 SFac= 4.00D+00 NAtFMM= 60 NAOKFM=F Big=F + Integral buffers will be 131072 words long. + Raffenetti 1 integral format. + Two-electron integral symmetry is turned on. + One-electron integrals computed using PRISM. + NBasis= 17 RedAO= T EigKep= 3.30D-02 NBF= 5 4 4 4 + NBsUse= 17 1.00D-06 EigRej= -1.00D+00 NBFU= 5 4 4 4 + Initial guess from the checkpoint file: "aiida.chk" + B after Tr= -0.000000 0.000000 0.000000 + Rot= 1.000000 0.000000 0.000000 -0.000000 Ang= 0.00 deg. + Initial guess orbital symmetries: + Occupied (A1) (A1) (T2) (T2) (T2) + Virtual (A1) (T2) (T2) (T2) (T2) (T2) (T2) (A1) (T2) (T2) + (T2) (A1) + Keep R1 ints in memory in symmetry-blocked form, NReq=817624. + Requested convergence on RMS density matrix=1.00D-08 within 128 cycles. + Requested convergence on MAX density matrix=1.00D-06. + Requested convergence on energy=1.00D-06. + No special actions if energy rises. + SCF Done: E(RHF) = -39.9768775602 A.U. after 6 cycles + NFock= 6 Conv=0.32D-08 -V/T= 2.0022 + Calling FoFJK, ICntrl= 2127 FMM=F ISym2X=1 I1Cent= 0 IOpClX= 0 NMat=1 NMatS=1 NMatT=0. + ***** Axes restored to original set ***** + ------------------------------------------------------------------- + Center Atomic Forces (Hartrees/Bohr) + Number Number X Y Z + ------------------------------------------------------------------- + 1 6 0.000000000 0.000000000 -0.000000000 + 2 1 0.000000032 -0.000000092 -0.000000000 + 3 1 0.000000032 0.000000046 0.000000079 + 4 1 0.000000032 0.000000046 -0.000000079 + 5 1 -0.000000097 0.000000000 0.000000000 + ------------------------------------------------------------------- + Cartesian Forces: Max 0.000000097 RMS 0.000000050 + + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + Berny optimization. + Using GEDIIS/GDIIS optimizer. + FormGI is forming the generalized inverse of G from B-inverse, IUseBI=4. + Internal Forces: Max 0.000000097 RMS 0.000000052 + Search for a local minimum. + Step number 3 out of a maximum of 24 + All quantities printed in internal units (Hartrees-Bohrs-Radians) + Mixed Optimization -- En-DIIS/RFO-DIIS + Swapping is turned off. + Update second derivatives using D2CorX and points 1 2 3 + DE= -2.64D-06 DEPred=-2.54D-06 R= 1.04D+00 + TightC=F SS= 1.41D+00 RLast= 3.69D-03 DXNew= 5.0454D-01 1.1078D-02 + Trust test= 1.04D+00 RLast= 3.69D-03 DXMaxT set to 3.00D-01 + The second derivative matrix: + R1 R2 R3 R4 A1 + R1 0.37579 + R2 0.00349 0.37579 + R3 0.00349 0.00349 0.37579 + R4 0.00349 0.00349 0.00349 0.37579 + A1 0.00000 0.00000 0.00000 0.00000 0.16000 + A2 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 + A3 0.00000 0.00000 0.00000 0.00000 0.00000 + A4 0.00000 0.00000 0.00000 0.00000 0.00000 + A5 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 + A6 0.00000 0.00000 0.00000 0.00000 0.00000 + D1 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 + D2 0.00000 0.00000 0.00000 0.00000 0.00000 + D3 0.00000 0.00000 0.00000 0.00000 0.00000 + D4 0.00000 0.00000 0.00000 0.00000 0.00000 + A2 A3 A4 A5 A6 + A2 0.16000 + A3 -0.00000 0.16000 + A4 -0.00000 0.00000 0.16000 + A5 0.00000 -0.00000 -0.00000 0.16000 + A6 -0.00000 0.00000 0.00000 -0.00000 0.16000 + D1 0.00000 -0.00000 -0.00000 0.00000 -0.00000 + D2 -0.00000 0.00000 0.00000 -0.00000 0.00000 + D3 -0.00000 0.00000 0.00000 -0.00000 0.00000 + D4 -0.00000 0.00000 0.00000 -0.00000 0.00000 + D1 D2 D3 D4 + D1 0.00499 + D2 -0.00000 0.00499 + D3 -0.00000 0.00000 0.00499 + D4 -0.00000 0.00000 0.00000 0.00499 + ITU= 1 1 0 + Eigenvalues --- 0.05269 0.05891 0.08766 0.16000 0.16000 + Eigenvalues --- 0.37230 0.37230 0.37230 0.38627 + En-DIIS/RFO-DIIS/Sim-DIIS IScMMF= -3 using points: 3 2 + RFO step: Lambda= 0.00000000D+00. + DidBck=F Rises=F RFO-DIIS coefs: 0.99986 0.00014 + Iteration 1 RMS(Cart)= 0.00000013 RMS(Int)= 0.00000000 + ClnCor: largest displacement from symmetrization is 1.86D-14 for atom 3. + Variable Old X -DE/DX Delta X Delta X Delta X New X + (Linear) (Quad) (Total) + R1 2.04639 0.00000 0.00000 -0.00000 0.00000 2.04639 + R2 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + R3 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + R4 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + A1 1.91063 -0.00000 -0.00000 -0.00000 0.00000 1.91063 + A2 1.91063 -0.00000 -0.00000 -0.00000 0.00000 1.91063 + A3 1.91063 0.00000 -0.00000 -0.00000 0.00000 1.91063 + A4 1.91063 0.00000 -0.00000 0.00000 0.00000 1.91063 + A5 1.91063 -0.00000 -0.00000 0.00000 -0.00000 1.91063 + A6 1.91063 0.00000 -0.00000 0.00000 -0.00000 1.91063 + D1 -2.09440 0.00000 0.00000 0.00000 0.00000 -2.09440 + D2 2.09440 -0.00000 0.00000 -0.00000 -0.00000 2.09440 + D3 -2.09440 0.00000 0.00000 0.00000 0.00000 -2.09440 + D4 2.09440 0.00000 0.00000 0.00000 0.00000 2.09440 + Item Value Threshold Converged? + Maximum Force 0.000000 0.000450 YES + RMS Force 0.000000 0.000300 YES + Maximum Displacement 0.000000 0.001800 YES + RMS Displacement 0.000000 0.001200 YES + Predicted change in Energy=-4.879740D-14 + Optimization completed. + -- Stationary point found. + ---------------------------- + ! Optimized Parameters ! + ! (Angstroms and Degrees) ! + -------------------------- -------------------------- + ! Name Definition Value Derivative Info. ! + -------------------------------------------------------------------------------- + ! R1 R(1,2) 1.0829 -DE/DX = 0.0 ! + ! R2 R(1,3) 1.0829 -DE/DX = 0.0 ! + ! R3 R(1,4) 1.0829 -DE/DX = 0.0 ! + ! R4 R(1,5) 1.0829 -DE/DX = 0.0 ! + ! A1 A(2,1,3) 109.4712 -DE/DX = 0.0 ! + ! A2 A(2,1,4) 109.4712 -DE/DX = 0.0 ! + ! A3 A(2,1,5) 109.4712 -DE/DX = 0.0 ! + ! A4 A(3,1,4) 109.4712 -DE/DX = 0.0 ! + ! A5 A(3,1,5) 109.4712 -DE/DX = 0.0 ! + ! A6 A(4,1,5) 109.4712 -DE/DX = 0.0 ! + ! D1 D(2,1,4,3) -120.0 -DE/DX = 0.0 ! + ! D2 D(2,1,5,3) 120.0 -DE/DX = 0.0 ! + ! D3 D(2,1,5,4) -120.0 -DE/DX = 0.0 ! + ! D4 D(3,1,5,4) 120.0 -DE/DX = 0.0 ! + -------------------------------------------------------------------------------- + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + + Input orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 -0.103550 2.041245 -0.026721 + 2 1 0 0.257404 1.020271 -0.026722 + 3 1 0 0.257424 2.551725 0.857464 + 4 1 0 0.257422 2.551726 -0.910907 + 5 1 0 -1.186452 2.041258 -0.026720 + --------------------------------------------------------------------- + Distance matrix (angstroms): + 1 2 3 4 5 + 1 C 0.000000 + 2 H 1.082901 0.000000 + 3 H 1.082901 1.768371 0.000000 + 4 H 1.082901 1.768371 1.768371 0.000000 + 5 H 1.082901 1.768371 1.768371 1.768371 0.000000 + Stoichiometry CH4 + Framework group TD[O(C),4C3(H)] + Deg. of freedom 1 + Full point group TD NOp 24 + Largest Abelian subgroup D2 NOp 4 + Largest concise Abelian subgroup D2 NOp 4 + Standard orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 0.000000 0.000000 0.000000 + 2 1 0 0.625213 0.625213 0.625213 + 3 1 0 -0.625213 -0.625213 0.625213 + 4 1 0 -0.625213 0.625213 -0.625213 + 5 1 0 0.625213 -0.625213 -0.625213 + --------------------------------------------------------------------- + Rotational constants (GHZ): 160.3560971 160.3560971 160.3560971 + + ********************************************************************** + + Population analysis using the SCF Density. + + ********************************************************************** + + Orbital symmetries: + Occupied (A1) (A1) (T2) (T2) (T2) + Virtual (A1) (T2) (T2) (T2) (T2) (T2) (T2) (A1) (T2) (T2) + (T2) (A1) + The electronic state is 1-A1. + Alpha occ. eigenvalues -- -11.14446 -0.94588 -0.54484 -0.54484 -0.54484 + Alpha virt. eigenvalues -- 0.29668 0.35257 0.35257 0.35257 0.92309 + Alpha virt. eigenvalues -- 0.92309 0.92309 1.33329 1.35898 1.35898 + Alpha virt. eigenvalues -- 1.35898 1.95586 + Condensed to atoms (all electrons): + 1 2 3 4 5 + 1 C 5.310653 0.370831 0.370831 0.370831 0.370831 + 2 H 0.370831 0.507841 -0.025722 -0.025722 -0.025722 + 3 H 0.370831 -0.025722 0.507841 -0.025722 -0.025722 + 4 H 0.370831 -0.025722 -0.025722 0.507841 -0.025722 + 5 H 0.370831 -0.025722 -0.025722 -0.025722 0.507841 + Mulliken charges: + 1 + 1 C -0.793976 + 2 H 0.198494 + 3 H 0.198494 + 4 H 0.198494 + 5 H 0.198494 + Sum of Mulliken charges = -0.00000 + Mulliken charges with hydrogens summed into heavy atoms: + 1 + 1 C -0.000000 + Electronic spatial extent (au): = 35.4787 + Charge= -0.0000 electrons + Dipole moment (field-independent basis, Debye): + X= 0.0000 Y= 0.0000 Z= 0.0000 Tot= 0.0000 + Quadrupole moment (field-independent basis, Debye-Ang): + XX= -8.3966 YY= -8.3966 ZZ= -8.3966 + XY= 0.0000 XZ= 0.0000 YZ= -0.0000 + Traceless Quadrupole moment (field-independent basis, Debye-Ang): + XX= -0.0000 YY= -0.0000 ZZ= 0.0000 + XY= 0.0000 XZ= 0.0000 YZ= -0.0000 + Octapole moment (field-independent basis, Debye-Ang**2): + XXX= 0.0000 YYY= 0.0000 ZZZ= 0.0000 XYY= 0.0000 + XXY= 0.0000 XXZ= 0.0000 XZZ= 0.0000 YZZ= 0.0000 + YYZ= 0.0000 XYZ= 0.7204 + Hexadecapole moment (field-independent basis, Debye-Ang**3): + XXXX= -15.3377 YYYY= -15.3377 ZZZZ= -15.3377 XXXY= 0.0000 + XXXZ= 0.0000 YYYX= 0.0000 YYYZ= -0.0000 ZZZX= 0.0000 + ZZZY= -0.0000 XXYY= -4.6685 XXZZ= -4.6685 YYZZ= -4.6685 + XXYZ= 0.0000 YYXZ= 0.0000 ZZXY= 0.0000 + N-N= 1.352346022345D+01 E-N=-1.194388681297D+02 KE= 3.988790259578D+01 + Symmetry A KE= 3.423400799510D+01 + Symmetry B1 KE= 1.884631533562D+00 + Symmetry B2 KE= 1.884631533562D+00 + Symmetry B3 KE= 1.884631533562D+00 + Unable to Open any file for archive entry. + 1\1\GINC-PCB4062-103040\FOpt\RHF\3-21G\C1H4\ROOT\16-Jul-2024\0\\# opt + freq hf/3-21g output=wfx\\Title Card Required\\0,1\C,-0.103550289,2.04 + 1245107,-0.026721361\H,0.2574044776,1.0202714819,-0.026722229\H,0.2574 + 237455,2.551724856,0.8574639471\H,0.2574223303,2.551725859,-0.91090666 + 77\H,-1.1864517095,2.0412582311,-0.0267204944\\Version=Apple M1-G16Rev + C.02\State=1-A1\HF=-39.9768776\RMSD=3.210e-09\RMSF=5.013e-08\Dipole=0. + ,0.,0.\Quadrupole=0.,0.,0.,0.,0.,0.\PG=TD [O(C1),4C3(H1)]\\@ + The archive entry for this job was punched. + + Writing a WFNX file to "aiida.wfx" + + + REVOLUTIONS HAVE NEVER LIGHTENED THE BURDEN OF TYRANNY: + THEY HAVE MERELY SHIFTED IT TO OTHER SHOULDERS. + -- G. B. SHAW (1903) + Job cpu time: 0 days 0 hours 0 minutes 0.6 seconds. + Elapsed time: 0 days 0 hours 0 minutes 0.7 seconds. + File lengths (MBytes): RWF= 6 Int= 0 D2E= 0 Chk= 1 Scr= 1 + Normal termination of Gaussian 16 at Tue Jul 16 15:39:49 2024. + Link1: Proceeding to internal job step number 2. + -------------------------------------------------------------- + #N Geom=AllCheck Guess=TCheck SCRF=Check GenChk RHF/3-21G Freq + -------------------------------------------------------------- + 1/10=4,29=7,30=1,38=1,40=1/1,3; + 2/12=2,40=1/2; + 3/5=5,11=1,14=-4,25=1,30=1,70=2,71=2,116=1,140=1/1,2,3; + 4/5=101/1; + 5/5=2,38=6,98=1/2; + 8/6=4,10=90,11=11/1; + 10/13=10,15=4/2; + 11/6=3,8=1,9=11,15=111,16=1/1,2,10; + 10/6=1/2; + 6/7=2,8=2,9=2,10=2,28=1/1; + 7/8=1,10=1,25=1/1,2,3,16; + 1/10=4,30=1/3; + 99/6=200/99; + Structure from the checkpoint file: "aiida.chk" + ------------------- + Title Card Required + ------------------- + Charge = 0 Multiplicity = 1 + Redundant internal coordinates found in file. (old form). + C,0,-0.103550289,2.041245107,-0.026721361 + H,0,0.2574044776,1.0202714819,-0.026722229 + H,0,0.2574237455,2.551724856,0.8574639471 + H,0,0.2574223303,2.551725859,-0.9109066677 + H,0,-1.1864517095,2.0412582311,-0.0267204944 + Recover connectivity data from disk. + + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + Berny optimization. + Initialization pass. + ---------------------------- + ! Initial Parameters ! + ! (Angstroms and Degrees) ! + -------------------------- -------------------------- + ! Name Definition Value Derivative Info. ! + -------------------------------------------------------------------------------- + ! R1 R(1,2) 1.0829 calculate D2E/DX2 analytically ! + ! R2 R(1,3) 1.0829 calculate D2E/DX2 analytically ! + ! R3 R(1,4) 1.0829 calculate D2E/DX2 analytically ! + ! R4 R(1,5) 1.0829 calculate D2E/DX2 analytically ! + ! A1 A(2,1,3) 109.4712 calculate D2E/DX2 analytically ! + ! A2 A(2,1,4) 109.4712 calculate D2E/DX2 analytically ! + ! A3 A(2,1,5) 109.4712 calculate D2E/DX2 analytically ! + ! A4 A(3,1,4) 109.4712 calculate D2E/DX2 analytically ! + ! A5 A(3,1,5) 109.4712 calculate D2E/DX2 analytically ! + ! A6 A(4,1,5) 109.4712 calculate D2E/DX2 analytically ! + ! D1 D(2,1,4,3) -120.0 calculate D2E/DX2 analytically ! + ! D2 D(2,1,5,3) 120.0 calculate D2E/DX2 analytically ! + ! D3 D(2,1,5,4) -120.0 calculate D2E/DX2 analytically ! + ! D4 D(3,1,5,4) 120.0 calculate D2E/DX2 analytically ! + -------------------------------------------------------------------------------- + Trust Radius=3.00D-01 FncErr=1.00D-07 GrdErr=1.00D-07 EigMax=2.50D+02 EigMin=1.00D-04 + Number of steps in this run= 2 maximum allowed number of steps= 2. + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + + Input orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 -0.103550 2.041245 -0.026721 + 2 1 0 0.257404 1.020271 -0.026722 + 3 1 0 0.257424 2.551725 0.857464 + 4 1 0 0.257422 2.551726 -0.910907 + 5 1 0 -1.186452 2.041258 -0.026720 + --------------------------------------------------------------------- + Distance matrix (angstroms): + 1 2 3 4 5 + 1 C 0.000000 + 2 H 1.082901 0.000000 + 3 H 1.082901 1.768371 0.000000 + 4 H 1.082901 1.768371 1.768371 0.000000 + 5 H 1.082901 1.768371 1.768371 1.768371 0.000000 + Stoichiometry CH4 + Framework group TD[O(C),4C3(H)] + Deg. of freedom 1 + Full point group TD NOp 24 + Largest Abelian subgroup D2 NOp 4 + Largest concise Abelian subgroup D2 NOp 4 + Standard orientation: + --------------------------------------------------------------------- + Center Atomic Atomic Coordinates (Angstroms) + Number Number Type X Y Z + --------------------------------------------------------------------- + 1 6 0 0.000000 0.000000 0.000000 + 2 1 0 0.625213 0.625213 0.625213 + 3 1 0 -0.625213 -0.625213 0.625213 + 4 1 0 -0.625213 0.625213 -0.625213 + 5 1 0 0.625213 -0.625213 -0.625213 + --------------------------------------------------------------------- + Rotational constants (GHZ): 160.3560971 160.3560971 160.3560971 + Standard basis: 3-21G (6D, 7F) + There are 5 symmetry adapted cartesian basis functions of A symmetry. + There are 4 symmetry adapted cartesian basis functions of B1 symmetry. + There are 4 symmetry adapted cartesian basis functions of B2 symmetry. + There are 4 symmetry adapted cartesian basis functions of B3 symmetry. + There are 5 symmetry adapted basis functions of A symmetry. + There are 4 symmetry adapted basis functions of B1 symmetry. + There are 4 symmetry adapted basis functions of B2 symmetry. + There are 4 symmetry adapted basis functions of B3 symmetry. + 17 basis functions, 27 primitive gaussians, 17 cartesian basis functions + 5 alpha electrons 5 beta electrons + nuclear repulsion energy 13.5234602235 Hartrees. + NAtoms= 5 NActive= 5 NUniq= 2 SFac= 4.00D+00 NAtFMM= 60 NAOKFM=F Big=F + Integral buffers will be 131072 words long. + Raffenetti 1 integral format. + Two-electron integral symmetry is turned on. + One-electron integrals computed using PRISM. + NBasis= 17 RedAO= T EigKep= 3.30D-02 NBF= 5 4 4 4 + NBsUse= 17 1.00D-06 EigRej= -1.00D+00 NBFU= 5 4 4 4 + Initial guess from the checkpoint file: "aiida.chk" + B after Tr= 0.000000 0.000000 0.000000 + Rot= 1.000000 0.000000 -0.000000 0.000000 Ang= 0.00 deg. + Initial guess orbital symmetries: + Occupied (A1) (A1) (T2) (T2) (T2) + Virtual (A1) (T2) (T2) (T2) (T2) (T2) (T2) (A1) (T2) (T2) + (T2) (A1) + Keep R1 ints in memory in symmetry-blocked form, NReq=817624. + Requested convergence on RMS density matrix=1.00D-08 within 128 cycles. + Requested convergence on MAX density matrix=1.00D-06. + Requested convergence on energy=1.00D-06. + No special actions if energy rises. + SCF Done: E(RHF) = -39.9768775602 A.U. after 1 cycles + NFock= 1 Conv=0.39D-09 -V/T= 2.0022 + Range of M.O.s used for correlation: 1 17 + NBasis= 17 NAE= 5 NBE= 5 NFC= 0 NFV= 0 + NROrb= 17 NOA= 5 NOB= 5 NVA= 12 NVB= 12 + Differentiating once with respect to electric field. + with respect to dipole field. + Electric field/nuclear overlap derivatives assumed to be zero. + Keep R1 ints in memory in symmetry-blocked form, NReq=818299. + There are 3 degrees of freedom in the 1st order CPHF. IDoFFX=0 NUNeed= 3. + 3 vectors produced by pass 0 Test12= 2.00D-15 3.33D-08 XBig12= 2.37D+00 9.12D-01. + AX will form 3 AO Fock derivatives at one time. + 3 vectors produced by pass 1 Test12= 2.00D-15 3.33D-08 XBig12= 2.49D-02 8.40D-02. + 3 vectors produced by pass 2 Test12= 2.00D-15 3.33D-08 XBig12= 9.84D-05 5.63D-03. + 3 vectors produced by pass 3 Test12= 2.00D-15 3.33D-08 XBig12= 1.88D-07 2.45D-04. + 3 vectors produced by pass 4 Test12= 2.00D-15 3.33D-08 XBig12= 1.85D-09 2.20D-05. + 3 vectors produced by pass 5 Test12= 2.00D-15 3.33D-08 XBig12= 1.24D-11 2.23D-06. + 3 vectors produced by pass 6 Test12= 2.00D-15 3.33D-08 XBig12= 2.15D-14 8.64D-08. + InvSVY: IOpt=1 It= 1 EMax= 2.22D-16 + Solved reduced A of dimension 21 with 3 vectors. + End of Minotr F.D. properties file 721 does not exist. + End of Minotr F.D. properties file 722 does not exist. + End of Minotr F.D. properties file 788 does not exist. + Symmetrizing basis deriv contribution to polar: + IMax=3 JMax=2 DiffMx= 0.00D+00 + G2DrvN: will do 6 centers at a time, making 1 passes. + PxScal for G2LodP: IOpCl= 0 ISclPx=1 IMOff= 1 NMtTot= 4 NTT= 153 ScalPx= 1.14D+00 + Calling FoFCou, ICntrl= 3107 FMM=F I1Cent= 0 AccDes= 0.00D+00. + End of G2Drv F.D. properties file 721 does not exist. + End of G2Drv F.D. properties file 722 does not exist. + End of G2Drv F.D. properties file 788 does not exist. + IDoAtm=11111 + Differentiating once with respect to electric field. + with respect to dipole field. + Differentiating once with respect to nuclear coordinates. + Keep R1 ints in memory in symmetry-blocked form, NReq=818415. + There are 9 degrees of freedom in the 1st order CPHF. IDoFFX=4 NUNeed= 9. + Will reuse 3 saved solutions. + 6 vectors produced by pass 0 Test12= 6.67D-16 1.11D-08 XBig12= 3.15D-02 8.76D-02. + AX will form 6 AO Fock derivatives at one time. + 6 vectors produced by pass 1 Test12= 6.67D-16 1.11D-08 XBig12= 5.77D-04 1.14D-02. + 6 vectors produced by pass 2 Test12= 6.67D-16 1.11D-08 XBig12= 1.92D-06 8.72D-04. + 6 vectors produced by pass 3 Test12= 6.67D-16 1.11D-08 XBig12= 6.87D-09 4.81D-05. + 6 vectors produced by pass 4 Test12= 6.67D-16 1.11D-08 XBig12= 3.38D-11 3.45D-06. + 6 vectors produced by pass 5 Test12= 6.67D-16 1.11D-08 XBig12= 2.65D-13 2.69D-07. + 3 vectors produced by pass 6 Test12= 6.67D-16 1.11D-08 XBig12= 9.31D-16 1.58D-08. + InvSVY: IOpt=1 It= 1 EMax= 6.66D-16 + Solved reduced A of dimension 39 with 6 vectors. + Isotropic polarizability for W= 0.000000 11.45 Bohr**3. + End of Minotr F.D. properties file 721 does not exist. + End of Minotr F.D. properties file 722 does not exist. + End of Minotr F.D. properties file 788 does not exist. + + ********************************************************************** + + Population analysis using the SCF Density. + + ********************************************************************** + + Orbital symmetries: + Occupied (A1) (A1) (T2) (T2) (T2) + Virtual (A1) (T2) (T2) (T2) (T2) (T2) (T2) (A1) (T2) (T2) + (T2) (A1) + The electronic state is 1-A1. + Alpha occ. eigenvalues -- -11.14446 -0.94588 -0.54484 -0.54484 -0.54484 + Alpha virt. eigenvalues -- 0.29668 0.35257 0.35257 0.35257 0.92309 + Alpha virt. eigenvalues -- 0.92309 0.92309 1.33329 1.35898 1.35898 + Alpha virt. eigenvalues -- 1.35898 1.95586 + Condensed to atoms (all electrons): + 1 2 3 4 5 + 1 C 5.310653 0.370831 0.370831 0.370831 0.370831 + 2 H 0.370831 0.507841 -0.025722 -0.025722 -0.025722 + 3 H 0.370831 -0.025722 0.507841 -0.025722 -0.025722 + 4 H 0.370831 -0.025722 -0.025722 0.507841 -0.025722 + 5 H 0.370831 -0.025722 -0.025722 -0.025722 0.507841 + Mulliken charges: + 1 + 1 C -0.793976 + 2 H 0.198494 + 3 H 0.198494 + 4 H 0.198494 + 5 H 0.198494 + Sum of Mulliken charges = 0.00000 + Mulliken charges with hydrogens summed into heavy atoms: + 1 + 1 C 0.000000 + APT charges: + 1 + 1 C -0.022273 + 2 H 0.005568 + 3 H 0.005568 + 4 H 0.005568 + 5 H 0.005568 + Sum of APT charges = -0.00000 + APT charges with hydrogens summed into heavy atoms: + 1 + 1 C -0.000000 + Electronic spatial extent (au): = 35.4787 + Charge= 0.0000 electrons + Dipole moment (field-independent basis, Debye): + X= 0.0000 Y= 0.0000 Z= 0.0000 Tot= 0.0000 + Quadrupole moment (field-independent basis, Debye-Ang): + XX= -8.3966 YY= -8.3966 ZZ= -8.3966 + XY= 0.0000 XZ= 0.0000 YZ= 0.0000 + Traceless Quadrupole moment (field-independent basis, Debye-Ang): + XX= 0.0000 YY= -0.0000 ZZ= 0.0000 + XY= 0.0000 XZ= 0.0000 YZ= 0.0000 + Octapole moment (field-independent basis, Debye-Ang**2): + XXX= 0.0000 YYY= 0.0000 ZZZ= 0.0000 XYY= 0.0000 + XXY= 0.0000 XXZ= 0.0000 XZZ= 0.0000 YZZ= 0.0000 + YYZ= 0.0000 XYZ= 0.7204 + Hexadecapole moment (field-independent basis, Debye-Ang**3): + XXXX= -15.3377 YYYY= -15.3377 ZZZZ= -15.3377 XXXY= -0.0000 + XXXZ= 0.0000 YYYX= -0.0000 YYYZ= 0.0000 ZZZX= 0.0000 + ZZZY= 0.0000 XXYY= -4.6685 XXZZ= -4.6685 YYZZ= -4.6685 + XXYZ= 0.0000 YYXZ= 0.0000 ZZXY= 0.0000 + N-N= 1.352346022345D+01 E-N=-1.194388681487D+02 KE= 3.988790260732D+01 + Symmetry A KE= 3.423400800752D+01 + Symmetry B1 KE= 1.884631533266D+00 + Symmetry B2 KE= 1.884631533266D+00 + Symmetry B3 KE= 1.884631533266D+00 + Exact polarizability: 11.452 0.000 11.452 -0.000 0.000 11.452 + Approx polarizability: 8.794 0.000 8.794 -0.000 0.000 8.794 + Calling FoFJK, ICntrl= 100127 FMM=F ISym2X=1 I1Cent= 0 IOpClX= 0 NMat=1 NMatS=1 NMatT=0. + Full mass-weighted force constant matrix: + Low frequencies --- -1.1285 -1.1285 -1.1285 -0.0008 0.0006 0.0006 + Low frequencies --- 1520.3260 1520.3260 1520.3260 + Diagonal vibrational polarizability: + 0.3228304 0.3228304 0.3228304 + Diagonal vibrational hyperpolarizability: + 0.0000000 0.0000000 0.0000000 + Harmonic frequencies (cm**-1), IR intensities (KM/Mole), Raman scattering + activities (A**4/AMU), depolarization ratios for plane and unpolarized + incident light, reduced masses (AMU), force constants (mDyne/A), + and normal coordinates: + 1 2 3 + T2 T2 T2 + Frequencies -- 1520.3260 1520.3260 1520.3260 + Red. masses -- 1.1821 1.1821 1.1821 + Frc consts -- 1.6099 1.6099 1.6099 + IR Inten -- 21.2675 21.2675 21.2675 + Raman Activ -- 3.1031 3.1031 3.1031 + Depolar (P) -- 0.7500 0.7500 0.7500 + Depolar (U) -- 0.8571 0.8571 0.8571 + Atom AN X Y Z X Y Z X Y Z + 1 6 -0.07 -0.07 -0.07 0.07 0.03 -0.10 0.07 -0.10 0.02 + 2 1 -0.05 -0.05 -0.05 -0.34 -0.14 0.48 -0.36 0.47 -0.12 + 3 1 0.22 0.22 0.48 0.02 0.23 0.11 -0.45 0.38 -0.03 + 4 1 0.22 0.48 0.22 -0.45 -0.03 0.38 0.01 0.11 0.24 + 5 1 0.48 0.22 0.22 -0.08 -0.40 0.22 -0.09 0.20 -0.39 + 4 5 6 + E E A1 + Frequencies -- 1739.7799 1739.7799 3186.7639 + Red. masses -- 1.0078 1.0078 1.0078 + Frc consts -- 1.7973 1.7973 6.0302 + IR Inten -- 0.0000 0.0000 0.0000 + Raman Activ -- 38.8428 38.8428 120.1225 + Depolar (P) -- 0.7500 0.7500 0.0000 + Depolar (U) -- 0.8571 0.8571 0.0000 + Atom AN X Y Z X Y Z X Y Z + 1 6 0.00 0.00 -0.00 0.00 -0.00 0.00 0.00 0.00 0.00 + 2 1 -0.32 -0.06 0.38 -0.26 0.40 -0.15 0.29 0.29 0.29 + 3 1 0.32 0.06 0.38 0.26 -0.40 -0.15 -0.29 -0.29 0.29 + 4 1 0.32 -0.06 -0.38 0.26 0.40 0.15 -0.29 0.29 -0.29 + 5 1 -0.32 0.06 -0.38 -0.26 -0.40 0.15 0.29 -0.29 -0.29 + 7 8 9 + T2 T2 T2 + Frequencies -- 3280.1249 3280.1249 3280.1249 + Red. masses -- 1.0989 1.0989 1.0989 + Frc consts -- 6.9661 6.9661 6.9661 + IR Inten -- 30.0716 30.0716 30.0716 + Raman Activ -- 58.1250 58.1250 58.1250 + Depolar (P) -- 0.7500 0.7500 0.7500 + Depolar (U) -- 0.8571 0.8571 0.8571 + Atom AN X Y Z X Y Z X Y Z + 1 6 -0.05 -0.05 -0.05 -0.06 0.07 -0.01 -0.05 -0.03 0.07 + 2 1 0.50 0.50 0.50 -0.02 0.02 -0.00 -0.01 -0.01 0.02 + 3 1 0.16 0.16 -0.18 -0.08 -0.04 0.06 0.47 0.47 -0.46 + 4 1 0.16 -0.19 0.16 0.43 -0.43 0.44 -0.20 0.18 -0.17 + 5 1 -0.18 0.16 0.16 0.37 -0.37 -0.39 0.28 -0.30 -0.27 + + ------------------- + - Thermochemistry - + ------------------- + Temperature 298.150 Kelvin. Pressure 1.00000 Atm. + Atom 1 has atomic number 6 and mass 12.00000 + Atom 2 has atomic number 1 and mass 1.00783 + Atom 3 has atomic number 1 and mass 1.00783 + Atom 4 has atomic number 1 and mass 1.00783 + Atom 5 has atomic number 1 and mass 1.00783 + Molecular mass: 16.03130 amu. + Principal axes and moments of inertia in atomic units: + 1 2 3 + Eigenvalues -- 11.25458 11.25458 11.25458 + X -0.20998 0.62546 0.75147 + Y -0.05344 0.76011 -0.64759 + Z 0.97624 0.17614 0.12618 + This molecule is a spherical top. + Rotational symmetry number 12. + Rotational temperatures (Kelvin) 7.69588 7.69588 7.69588 + Rotational constants (GHZ): 160.35610 160.35610 160.35610 + Zero-point vibrational energy 126012.7 (Joules/Mol) + 30.11776 (Kcal/Mol) + Vibrational temperatures: 2187.41 2187.41 2187.41 2503.16 2503.16 + (Kelvin) 4585.04 4719.37 4719.37 4719.37 + + Zero-point correction= 0.047996 (Hartree/Particle) + Thermal correction to Energy= 0.050845 + Thermal correction to Enthalpy= 0.051790 + Thermal correction to Gibbs Free Energy= 0.030702 + Sum of electronic and zero-point Energies= -39.928882 + Sum of electronic and thermal Energies= -39.926032 + Sum of electronic and thermal Enthalpies= -39.925088 + Sum of electronic and thermal Free Energies= -39.946176 + + E (Thermal) CV S + KCal/Mol Cal/Mol-Kelvin Cal/Mol-Kelvin + Total 31.906 6.234 44.383 + Electronic 0.000 0.000 0.000 + Translational 0.889 2.981 34.261 + Rotational 0.889 2.981 10.081 + Vibrational 30.129 0.273 0.041 + Q Log10(Q) Ln(Q) + Total Bot 0.755339D-14 -14.121858 -32.516781 + Total V=0 0.900764D+08 7.954611 18.316168 + Vib (Bot) 0.840574D-22 -22.075424 -50.830542 + Vib (V=0) 0.100241D+01 0.001045 0.002407 + Electronic 0.100000D+01 0.000000 0.000000 + Translational 0.252294D+07 6.401907 14.740936 + Rotational 0.356171D+02 1.551659 3.572826 + ***** Axes restored to original set ***** + ------------------------------------------------------------------- + Center Atomic Forces (Hartrees/Bohr) + Number Number X Y Z + ------------------------------------------------------------------- + 1 6 -0.000000000 -0.000000000 -0.000000000 + 2 1 0.000000032 -0.000000092 -0.000000000 + 3 1 0.000000032 0.000000046 0.000000079 + 4 1 0.000000032 0.000000046 -0.000000079 + 5 1 -0.000000097 0.000000000 0.000000000 + ------------------------------------------------------------------- + Cartesian Forces: Max 0.000000097 RMS 0.000000050 + FormGI is forming the generalized inverse of G from B-inverse, IUseBI=4. + + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + Berny optimization. + Internal Forces: Max 0.000000097 RMS 0.000000052 + Search for a local minimum. + Step number 1 out of a maximum of 2 + All quantities printed in internal units (Hartrees-Bohrs-Radians) + Second derivative matrix not updated -- analytic derivatives used. + The second derivative matrix: + R1 R2 R3 R4 A1 + R1 0.37684 + R2 0.00350 0.37684 + R3 0.00350 0.00350 0.37684 + R4 0.00350 0.00350 0.00350 0.37684 + A1 0.00250 0.00250 -0.00157 -0.00343 0.02402 + A2 0.00392 -0.00101 0.00436 -0.00727 -0.01048 + A3 0.00766 -0.00615 -0.00681 0.00529 -0.01585 + A4 -0.00101 0.00392 0.00436 -0.00727 -0.01048 + A5 -0.00615 0.00766 -0.00681 0.00529 -0.01585 + A6 -0.00692 -0.00692 0.00646 0.00739 0.02863 + D1 -0.00485 -0.00485 -0.00342 0.01311 -0.01659 + D2 0.00399 0.00399 -0.01026 0.00228 0.01001 + D3 -0.00525 0.00924 -0.00513 0.00114 0.00500 + D4 -0.00924 0.00525 0.00513 -0.00114 -0.00500 + A2 A3 A4 A5 A6 + A2 0.04548 + A3 -0.02753 0.08884 + A4 -0.00219 0.02956 0.04548 + A5 0.02956 -0.04277 -0.02753 0.08884 + A6 -0.03484 -0.03225 -0.03484 -0.03225 0.10555 + D1 -0.01368 0.01817 -0.01368 0.01817 0.00760 + D2 -0.01159 0.00880 -0.01159 0.00880 -0.00443 + D3 -0.01751 -0.00094 0.00592 0.00973 -0.00222 + D4 -0.00592 -0.00973 0.01751 0.00094 0.00222 + D1 D2 D3 D4 + D1 0.03707 + D2 0.00194 0.02303 + D3 0.00097 0.01152 0.02337 + D4 -0.00097 -0.01152 0.01185 0.02337 + ITU= 0 + Eigenvalues --- 0.04698 0.05298 0.08062 0.15957 0.16005 + Eigenvalues --- 0.37480 0.37482 0.37526 0.38733 + Angle between quadratic step and forces= 90.00 degrees. + Linear search not attempted -- first point. + Iteration 1 RMS(Cart)= 0.00000013 RMS(Int)= 0.00000000 + ClnCor: largest displacement from symmetrization is 2.85D-14 for atom 5. + Variable Old X -DE/DX Delta X Delta X Delta X New X + (Linear) (Quad) (Total) + R1 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + R2 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + R3 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + R4 2.04639 0.00000 0.00000 0.00000 0.00000 2.04639 + A1 1.91063 0.00000 0.00000 -0.00000 0.00000 1.91063 + A2 1.91063 -0.00000 0.00000 -0.00000 0.00000 1.91063 + A3 1.91063 -0.00000 0.00000 -0.00000 -0.00000 1.91063 + A4 1.91063 -0.00000 0.00000 -0.00000 0.00000 1.91063 + A5 1.91063 0.00000 0.00000 0.00000 0.00000 1.91063 + A6 1.91063 0.00000 0.00000 0.00000 0.00000 1.91063 + D1 -2.09440 0.00000 0.00000 0.00000 0.00000 -2.09440 + D2 2.09440 0.00000 0.00000 0.00000 -0.00000 2.09440 + D3 -2.09440 0.00000 0.00000 0.00000 0.00000 -2.09440 + D4 2.09440 0.00000 0.00000 0.00000 0.00000 2.09440 + Item Value Threshold Converged? + Maximum Force 0.000000 0.000450 YES + RMS Force 0.000000 0.000300 YES + Maximum Displacement 0.000000 0.001800 YES + RMS Displacement 0.000000 0.001200 YES + Predicted change in Energy=-4.876504D-14 + Optimization completed. + -- Stationary point found. + ---------------------------- + ! Optimized Parameters ! + ! (Angstroms and Degrees) ! + -------------------------- -------------------------- + ! Name Definition Value Derivative Info. ! + -------------------------------------------------------------------------------- + ! R1 R(1,2) 1.0829 -DE/DX = 0.0 ! + ! R2 R(1,3) 1.0829 -DE/DX = 0.0 ! + ! R3 R(1,4) 1.0829 -DE/DX = 0.0 ! + ! R4 R(1,5) 1.0829 -DE/DX = 0.0 ! + ! A1 A(2,1,3) 109.4712 -DE/DX = 0.0 ! + ! A2 A(2,1,4) 109.4712 -DE/DX = 0.0 ! + ! A3 A(2,1,5) 109.4712 -DE/DX = 0.0 ! + ! A4 A(3,1,4) 109.4712 -DE/DX = 0.0 ! + ! A5 A(3,1,5) 109.4712 -DE/DX = 0.0 ! + ! A6 A(4,1,5) 109.4712 -DE/DX = 0.0 ! + ! D1 D(2,1,4,3) -120.0 -DE/DX = 0.0 ! + ! D2 D(2,1,5,3) 120.0 -DE/DX = 0.0 ! + ! D3 D(2,1,5,4) -120.0 -DE/DX = 0.0 ! + ! D4 D(3,1,5,4) 120.0 -DE/DX = 0.0 ! + -------------------------------------------------------------------------------- + GradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGradGrad + + Dipole is zero, so no output in dipole orientation. + + ---------------------------------------------------------------------- + + Electric dipole moment (input orientation): + (Debye = 10**-18 statcoulomb cm , SI units = C m) + (au) (Debye) (10**-30 SI) + Tot 0.000000D+00 0.000000D+00 0.000000D+00 + x 0.000000D+00 0.000000D+00 0.000000D+00 + y 0.000000D+00 0.000000D+00 0.000000D+00 + z 0.000000D+00 0.000000D+00 0.000000D+00 + + Dipole polarizability, Alpha (input orientation). + (esu units = cm**3 , SI units = C**2 m**2 J**-1) + Alpha(0;0): + (au) (10**-24 esu) (10**-40 SI) + iso 0.114523D+02 0.169705D+01 0.188822D+01 + aniso 0.000000D+00 0.000000D+00 0.000000D+00 + xx 0.114523D+02 0.169705D+01 0.188822D+01 + yx 0.000000D+00 0.000000D+00 0.000000D+00 + yy 0.114523D+02 0.169705D+01 0.188822D+01 + zx 0.000000D+00 0.000000D+00 0.000000D+00 + zy 0.000000D+00 0.000000D+00 0.000000D+00 + zz 0.114523D+02 0.169705D+01 0.188822D+01 + + First dipole hyperpolarizability, Beta (input orientation). + ||, _|_ parallel and perpendicular components, (z) with respect to z axis, + vector components x,y,z. Values do not include the 1/n! factor of 1/2. + (esu units = statvolt**-1 cm**4 , SI units = C**3 m**3 J**-2) + Beta(0;0,0): + (au) (10**-30 esu) (10**-50 SI) + || (z) 0.000000D+00 0.000000D+00 0.000000D+00 + _|_(z) 0.000000D+00 0.000000D+00 0.000000D+00 + x 0.000000D+00 0.000000D+00 0.000000D+00 + y 0.000000D+00 0.000000D+00 0.000000D+00 + z 0.000000D+00 0.000000D+00 0.000000D+00 + || 0.000000D+00 0.000000D+00 0.000000D+00 + xxx -0.320901D+02 -0.277233D+00 -0.102892D+00 + xxy 0.777822D-03 0.671977D-05 0.249398D-05 + yxy 0.160448D+02 0.138614D+00 0.514453D-01 + yyy -0.226917D+02 -0.196038D+00 -0.727577D-01 + xxz 0.513634D-04 0.443740D-06 0.164690D-06 + yxz 0.181583D-04 0.156874D-06 0.582220D-07 + yyz -0.514533D-04 -0.444517D-06 -0.164978D-06 + zxz 0.160453D+02 0.138619D+00 0.514470D-01 + zyz 0.226909D+02 0.196032D+00 0.727552D-01 + zzz 0.000000D+00 0.000000D+00 0.000000D+00 + + ---------------------------------------------------------------------- + Unable to Open any file for archive entry. + 1\1\GINC-PCB4062-103040\Freq\RHF\3-21G\C1H4\ROOT\16-Jul-2024\0\\#N Geo + m=AllCheck Guess=TCheck SCRF=Check GenChk RHF/3-21G Freq\\Title Card R + equired\\0,1\C,-0.103550289,2.041245107,-0.026721361\H,0.2574044776,1. + 0202714819,-0.026722229\H,0.2574237455,2.551724856,0.8574639471\H,0.25 + 74223303,2.551725859,-0.9109066677\H,-1.1864517095,2.0412582311,-0.026 + 7204944\\Version=Apple M1-G16RevC.02\State=1-A1\HF=-39.9768776\RMSD=3. + 934e-10\RMSF=5.018e-08\ZeroPoint=0.0479957\Thermal=0.0508454\ETot=-39. + 9260322\HTot=-39.925088\GTot=-39.9461757\Dipole=0.,0.,0.\DipoleDeriv=- + 0.0222729,0.,0.,0.,-0.0222729,0.,0.,0.,-0.0222729,0.0597859,0.0766704, + 0.,0.0766704,-0.1299731,-0.0000002,0.,-0.0000002,0.0868919,0.059783,-0 + .0383367,-0.0664018,-0.0383367,0.0326771,-0.0939036,-0.0664018,-0.0939 + 036,-0.0757555,0.0597832,-0.0383366,0.0664015,-0.0383366,0.0326769,0.0 + 939038,0.0664015,0.0939038,-0.0757555,-0.1570792,0.000003,0.0000002,0. + 000003,0.0868919,0.,0.0000002,0.,0.0868919\Polar=11.452264,0.,11.45226 + 4,0.,0.,11.452264\PolarDeriv=4.945444,-0.0001199,-2.4726796,-0.0000079 + ,-0.0000028,-2.4727644,-0.0001199,-2.4726796,3.4970469,-0.0000028,0.00 + 00079,-3.496927,-0.0000079,-0.0000028,0.0000079,-2.4727644,-3.496927,0 + .,1.2635637,-2.9541166,1.029271,-0.000001,0.0000009,0.6357064,-0.60615 + 53,1.8593687,-7.8757984,0.0000009,-0.0000048,0.198469,0.000001,0.00000 + 09,-0.0000029,1.4658041,-2.1494923,-0.0000052,1.2636867,1.4770795,0.73 + 40968,2.5583632,0.170432,0.930914,0.3031151,1.5642388,2.5220945,0.1704 + 32,2.678863,1.3164754,0.5249778,0.170432,0.6454776,1.761056,2.4904398, + 6.003222,1.2636776,1.4770818,0.7340962,-2.5583592,-0.1704306,0.9309122 + ,0.3031152,1.5642349,2.5221013,-0.1704306,-2.678867,1.3164767,-0.52497 + 38,-0.1704306,-0.6454816,1.7610509,2.4904434,-6.003222,-8.7363732,0.00 + 00751,-0.0247838,0.000005,0.0000005,-0.0247676,0.0000449,-2.5151621,-0 + .6654451,0.0000005,0.0000009,0.6655067,0.000003,0.0000005,-0.0000011,- + 2.515146,0.6655369,0.0000052\HyperPolar=-32.0900613,0.0007778,16.04475 + 56,-22.6916833,0.0000514,0.0000182,-0.0000515,16.0453057,22.6909055,0. + \Quadrupole=0.,0.,0.,0.,0.,0.\PG=TD [O(C1),4C3(H1)]\NImag=0\\0.6110821 + 9,0.,0.61108219,0.,0.,0.61108219,-0.08969900,0.08919090,0.00000008,0.0 + 9213770,0.08919090,-0.31044617,-0.00000021,-0.10065219,0.34125152,0.00 + 000008,-0.00000021,-0.05816647,-0.00000009,0.00000024,0.05655315,-0.08 + 970237,-0.04459721,-0.07724538,0.00458999,0.00593021,0.01282648,0.0921 + 4150,-0.04459721,-0.12123465,-0.10923833,-0.01407391,-0.01652420,-0.03 + 184826,0.05032809,0.12772577,-0.07724538,-0.10923833,-0.24737462,0.001 + 27749,0.00081842,0.00139064,0.08717163,0.12327577,0.27007509,-0.089702 + 12,-0.04459713,0.07724508,0.00458996,0.00593022,-0.01282648,0.00459027 + ,0.00814324,-0.01154959,0.09214122,-0.04459713,-0.12123490,0.10923855, + -0.01407386,-0.01652423,0.03184826,0.00814320,0.01034796,-0.01633313,0 + .05032799,0.12772605,0.07724508,0.10923855,-0.24737462,-0.00127751,-0. + 00081845,0.00139069,0.01154955,0.01633315,-0.02548180,-0.08717129,-0.1 + 2327602,0.27007509,-0.34197870,0.00000344,0.00000023,-0.01161865,-0.00 + 039915,0.,-0.01161939,0.00019980,0.00034584,-0.01161933,0.00019979,-0. + 00034582,0.37683607,0.00000344,-0.05816647,0.,0.03960905,0.00224308,-0 + .00000003,-0.01980429,-0.00031488,0.00147726,-0.01980433,-0.00031488,- + 0.00147723,-0.00000388,0.05655315,0.00000023,0.,-0.05816647,0.00000003 + ,0.,-0.00116801,-0.03430228,0.00147766,0.00139069,0.03430228,-0.001477 + 67,0.00139064,-0.00000026,0.,0.05655315\\0.,0.,0.,-0.00000003,0.000000 + 09,0.,-0.00000003,-0.00000005,-0.00000008,-0.00000003,-0.00000005,0.00 + 000008,0.00000010,0.,0.\\\@ + The archive entry for this job was punched. + + Writing a WFNX file to "aiida.wfx" + + + REVOLUTIONS HAVE NEVER LIGHTENED THE BURDEN OF TYRANNY: + THEY HAVE MERELY SHIFTED IT TO OTHER SHOULDERS. + -- G. B. SHAW (1903) + Job cpu time: 0 days 0 hours 0 minutes 0.3 seconds. + Elapsed time: 0 days 0 hours 0 minutes 0.4 seconds. + File lengths (MBytes): RWF= 6 Int= 0 D2E= 0 Chk= 1 Scr= 1 + Normal termination of Gaussian 16 at Tue Jul 16 15:39:49 2024. diff --git a/tests/workchains/fixtures/gaussian/default/aiida.wfx b/tests/workchains/fixtures/gaussian/default/aiida.wfx new file mode 100644 index 0000000..b2b829e --- /dev/null +++ b/tests/workchains/fixtures/gaussian/default/aiida.wfx @@ -0,0 +1,180 @@ + + Title Card Required + + + GTO + + + 5 + + + 5 + + + 0 + + + 0 + + + 10 + + + 5 + + + 5 + + + 1 + + + 0 + + + C1 + H2 + H3 + H4 + H5 + + + 6 + 1 + 1 + 1 + 1 + + + 6.000000000000e+00 + 1.000000000000e+00 + 1.000000000000e+00 + 1.000000000000e+00 + 1.000000000000e+00 + + + -0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 + 1.181482145849e+00 1.181482145849e+00 1.181482145849e+00 + -1.181482145849e+00 -1.181482145849e+00 1.181482145849e+00 + -1.181482145849e+00 1.181482145849e+00 -1.181482145849e+00 + 1.181482145849e+00 -1.181482145849e+00 -1.181482145849e+00 + + + C1 -3.474777423609e-16 -1.617096093728e-15 1.430677600575e-15 + H2 -5.610697462188e-08 -5.610697706437e-08 -5.610697506597e-08 + H3 5.610697861869e-08 5.610697706437e-08 -5.610697861869e-08 + H4 5.610697662028e-08 -5.610697706437e-08 5.610697328962e-08 + H5 -5.610697928482e-08 5.610697750846e-08 5.610697795255e-08 + + + 7.954726975485e-07 + + + 2.002230644946e+00 + + + 27 + + + 1 1 1 1 1 + 1 1 1 1 1 + 1 1 1 1 1 + 2 2 2 3 3 + 3 4 4 4 5 + 5 5 + + + 1 1 1 1 1 + 2 2 3 3 4 + 4 1 2 3 4 + 1 1 1 1 1 + 1 1 1 1 1 + 1 1 + + + 1.722560000000e+02 2.591090000000e+01 5.533350000000e+00 3.664980000000e+00 7.705450000000e-01 + 3.664980000000e+00 7.705450000000e-01 3.664980000000e+00 7.705450000000e-01 3.664980000000e+00 + 7.705450000000e-01 1.958570000000e-01 1.958570000000e-01 1.958570000000e-01 1.958570000000e-01 + 5.447178000000e+00 8.245472400000e-01 1.831915800000e-01 5.447178000000e+00 8.245472400000e-01 + 1.831915800000e-01 5.447178000000e+00 8.245472400000e-01 1.831915800000e-01 5.447178000000e+00 + 8.245472400000e-01 1.831915800000e-01 + + + 2.000000000000e+00 + 2.000000000000e+00 + 2.000000000000e+00 + 2.000000000000e+00 + 2.000000000000e+00 + + + -1.114445915914e+01 + -9.458816854450e-01 + -5.448380573770e-01 + -5.448380573770e-01 + -5.448380573770e-01 + + + Alpha and Beta + Alpha and Beta + Alpha and Beta + Alpha and Beta + Alpha and Beta + + + + 1 + + 2.066116727628e+00 2.898847210121e+00 1.778482355779e+00 -7.425835606458e-02 + 7.080832892802e-02 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 -1.517117482618e-02 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 -2.210657116597e-04 + -3.105541526307e-04 2.815341105422e-03 -2.210657116597e-04 -3.105541526307e-04 + 2.815341105422e-03 -2.210657116597e-04 -3.105541526307e-04 2.815341105422e-03 + -2.210657116597e-04 -3.105541526307e-04 2.815341105422e-03 + + 2 + + -4.372683030661e-01 -6.135055117980e-01 -3.763940107281e-01 -1.513018992661e-01 + 1.442724458020e-01 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 1.287105819971e-01 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 4.883656346286e-02 + 6.860583430030e-02 4.352316989135e-03 4.883656346286e-02 6.860583430030e-02 + 4.352316989135e-03 4.883656346286e-02 6.860583430030e-02 4.352316989135e-03 + 4.883656346286e-02 6.860583430030e-02 4.352316989135e-03 + + 3 + + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 -0.000000000000e+00 + 0.000000000000e+00 6.400291263493e-01 3.316354743381e-01 0.000000000000e+00 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 + 5.757518164005e-02 0.000000000000e+00 0.000000000000e+00 6.323907468413e-02 + 8.883854987837e-02 2.974314828888e-02 -6.323907468413e-02 -8.883854987837e-02 + -2.974314828888e-02 -6.323907468413e-02 -8.883854987837e-02 -2.974314828888e-02 + 6.323907468413e-02 8.883854987837e-02 2.974314828888e-02 + + 4 + + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 -0.000000000000e+00 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 6.400291263493e-01 + 3.316354743381e-01 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 + 0.000000000000e+00 5.757518164005e-02 0.000000000000e+00 6.323907468413e-02 + 8.883854987837e-02 2.974314828888e-02 -6.323907468413e-02 -8.883854987837e-02 + -2.974314828888e-02 6.323907468413e-02 8.883854987837e-02 2.974314828888e-02 + -6.323907468413e-02 -8.883854987837e-02 -2.974314828888e-02 + + 5 + + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 -0.000000000000e+00 + 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 + 0.000000000000e+00 6.400291263493e-01 3.316354743381e-01 0.000000000000e+00 + 0.000000000000e+00 0.000000000000e+00 5.757518164005e-02 6.323907468413e-02 + 8.883854987837e-02 2.974314828888e-02 6.323907468413e-02 8.883854987837e-02 + 2.974314828888e-02 -6.323907468413e-02 -8.883854987837e-02 -2.974314828888e-02 + -6.323907468413e-02 -8.883854987837e-02 -2.974314828888e-02 + + + -3.997687756021e+01 + + + 2.002230625004e+00 + diff --git a/tests/workchains/test_calcfunctions.py b/tests/workchains/test_calcfunctions.py index c8900e7..3989ed9 100644 --- a/tests/workchains/test_calcfunctions.py +++ b/tests/workchains/test_calcfunctions.py @@ -10,9 +10,13 @@ def test_generate_structure_data(): """Test generate_structure_data function""" - test_Str = Str( - "C 0.0 0.0 0.0\nH -1.0 0.0 0.0\nH 1.0 1.0 0.0\nH 1.0 -1.0 1.0\n H 1.0 -1.0 -1.0" + test_Str = Dict( + { + "xyz": "C 0.0 0.0 0.0\nH -1.0 0.0 0.0\nH 1.0 1.0 0.0\nH 1.0 -1.0 1.0\n H 1.0 -1.0 -1.0" + } ) + # "C 0.0 0.0 0.0\nH -1.0 0.0 0.0\nH 1.0 1.0 0.0\nH 1.0 -1.0 1.0\n H 1.0 -1.0 -1.0" + structure_data = aimw.generate_structure_data(test_Str) assert isinstance(structure_data, StructureData) diff --git a/tests/workchains/test_gaussiantoaim.py b/tests/workchains/test_gaussiantoaim.py new file mode 100644 index 0000000..0b7cac7 --- /dev/null +++ b/tests/workchains/test_gaussiantoaim.py @@ -0,0 +1,71 @@ +"""Tests for aiida_aimall.workchains.SubstituentParameterWorkchain""" + +from aiida.common import LinkType +from aiida.orm import Dict +from plumpy.utils import AttributesFrozendict + + +def test_setup(generate_workchain_g16toaim): + """Test creation of `AimReorWorkChain`.""" + process = generate_workchain_g16toaim() + + assert isinstance(process.inputs, AttributesFrozendict) + + +# pylint:disable=too-many-arguments +# pylint:disable=too-many-locals +def test_default( + generate_workchain_g16toaim, + fixture_localhost, + generate_g16_inputs, + generate_calc_job_node, + fixture_code, +): + """Test the default inputs of `SubstituentParameterWorkchain""" + entry_point_calc_job_aim = "aimall.aimqb" + entry_point_calc_job_gauss = "aimall.gaussianwfx" + name = "default" + # create the workchain node + wkchain = generate_workchain_g16toaim() + # test the first workchain step + gaussian_inputs = wkchain.g16() + assert isinstance(gaussian_inputs, AttributesFrozendict) + # Generate mock CalcJobNodes and needed outputs for the gaussian optimization + g16_node = generate_calc_job_node( + entry_point_name=entry_point_calc_job_gauss, + computer=fixture_localhost, + test_name=name, + inputs=generate_g16_inputs(fixture_code), + test_folder_type="workchains", + ) + g16_node.store() + wkchain.ctx.g16 = g16_node + + assert wkchain.classify_wfx() is None + assert "wfx" in wkchain.ctx + # Run dry_run aim_reor + + # Generate mock aim_reor outputs + + # Test aim + aim_inputs = wkchain.aim() + assert isinstance(aim_inputs, AttributesFrozendict) + # generate mock aim outputs + aim_sp_node = generate_calc_job_node( + entry_point_calc_job_aim, + fixture_localhost, + name, + generate_g16_inputs(fixture_code), + test_folder_type="workchains", + ) + wkchain.ctx.aim = aim_sp_node + out_dict = Dict( + {"atomic_properties": {}, "bcp_properties": {}, "cc_properties": {}} + ) + out_dict.base.links.add_incoming( + aim_sp_node, link_type=LinkType.CREATE, link_label="output_parameters" + ) + out_dict.store() + # Test results of the workchain + assert wkchain.result() is None + assert "parameter_dict" in wkchain.outputs diff --git a/tests/workchains/test_smilestogaussian.py b/tests/workchains/test_smilestogaussian.py index ff93fff..fc6393a 100644 --- a/tests/workchains/test_smilestogaussian.py +++ b/tests/workchains/test_smilestogaussian.py @@ -3,7 +3,7 @@ import cclib from aiida.common import LinkType -from aiida.orm import Dict, SinglefileData, StructureData +from aiida.orm import Dict, SinglefileData, Str, StructureData from plumpy.utils import AttributesFrozendict @@ -19,7 +19,6 @@ def test_setup(generate_workchain_aimreor): def test_default( generate_workchain_smitog16, fixture_localhost, - generate_workchain_folderdata, generate_g16_inputs, generate_calc_job_node, fixture_code, @@ -47,6 +46,10 @@ def test_default( assert "structure" in wkchain.ctx assert isinstance(wkchain.ctx.structure, StructureData) + assert wkchain.get_wfx_name() is None + assert "wfxname" in wkchain.ctx + assert isinstance(wkchain.ctx.wfxname, Str) + assert wkchain.ctx.wfxname.value == "aiida.wfx" # Try the submit gaussian step, as dry_run which returns the inputs gaussian_inputs = wkchain.submit_gaussian() assert isinstance(gaussian_inputs, AttributesFrozendict) @@ -61,13 +64,10 @@ def test_default( node.store() wkchain.ctx.opt = node # Get a wavefunction file to link to the gaussian calculation as output for use in next step - gaussian_folder = generate_workchain_folderdata(entry_point_name, test) - with gaussian_folder.open("aiida.wfx", "rb") as handle: - output_node = SinglefileData(file=handle) - output_node.base.links.add_incoming( - node, link_type=LinkType.CREATE, link_label="wfx" - ) - output_node.store() + + assert wkchain.create_wfx_file() is None + + # output_node.store() # parse the log file and add the resulting dictionary to outputs filepath_input = os.path.join( filepath_tests, @@ -85,6 +85,8 @@ def test_default( node, link_type=LinkType.CREATE, link_label="output_parameters" ) output_parameters.store() + assert "wfxfile" in wkchain.ctx + assert isinstance(wkchain.ctx.wfxfile, SinglefileData) # Finish the workchain, adding the wfx and cclib parsed dictionary as workchain outputs assert wkchain.results() is None assert "wfx" in wkchain.outputs