From 419ba16fb27e06e839f4e6abb86091508f00bc7e Mon Sep 17 00:00:00 2001 From: Kevin Gasperich Date: Fri, 13 Jan 2023 14:08:02 -0600 Subject: [PATCH 1/3] added PT for density with fractional occupations --- .../simde/density/scf_density_fractional.hpp | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/simde/density/scf_density_fractional.hpp diff --git a/include/simde/density/scf_density_fractional.hpp b/include/simde/density/scf_density_fractional.hpp new file mode 100644 index 00000000..df287dc6 --- /dev/null +++ b/include/simde/density/scf_density_fractional.hpp @@ -0,0 +1,41 @@ +/* + * Copyright 2022 NWChemEx-Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include "simde/types.hpp" +#include + +namespace simde { + +/** @brief API for modules which create densities from orbitals which can have fractional occupations. + * + * Modules which satisfy the `SCFDensityFractional` property type effectively + * have an API: `simde::type::el_density (const canonical_space&, std::vector&)`. + * For example, the `SCF::DensityFractional` will compute the density by contracting + * the occupied orbitals together with their occupations. + */ +DECLARE_DERIVED_PROPERTY_TYPE(SCFDensityFractional, SCFDensity); + +PROPERTY_TYPE_INPUTS(SCFDensityFractional) { + auto rv = + pluginplay::declare_input().add_field&>("occ"); + rv["occ"].set_description("vector of orbital occupations"); + return rv; +} + +PROPERTY_TYPE_RESULTS(SCFDensityFractional) { return pluginplay::declare_result(); } + +} // namespace simde \ No newline at end of file From bc512c2c4a36003aca056567f28f7d526153a15e Mon Sep 17 00:00:00 2001 From: Clang Robot Date: Fri, 13 Jan 2023 20:08:43 +0000 Subject: [PATCH 2/3] Committing clang-format changes --- include/simde/density/scf_density_fractional.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/simde/density/scf_density_fractional.hpp b/include/simde/density/scf_density_fractional.hpp index df287dc6..74e1d08d 100644 --- a/include/simde/density/scf_density_fractional.hpp +++ b/include/simde/density/scf_density_fractional.hpp @@ -20,12 +20,14 @@ namespace simde { -/** @brief API for modules which create densities from orbitals which can have fractional occupations. +/** @brief API for modules which create densities from orbitals which can have + * fractional occupations. * * Modules which satisfy the `SCFDensityFractional` property type effectively - * have an API: `simde::type::el_density (const canonical_space&, std::vector&)`. - * For example, the `SCF::DensityFractional` will compute the density by contracting - * the occupied orbitals together with their occupations. + * have an API: `simde::type::el_density (const canonical_space&, + * std::vector&)`. For example, the `SCF::DensityFractional` will + * compute the density by contracting the occupied orbitals together with their + * occupations. */ DECLARE_DERIVED_PROPERTY_TYPE(SCFDensityFractional, SCFDensity); @@ -36,6 +38,8 @@ PROPERTY_TYPE_INPUTS(SCFDensityFractional) { return rv; } -PROPERTY_TYPE_RESULTS(SCFDensityFractional) { return pluginplay::declare_result(); } +PROPERTY_TYPE_RESULTS(SCFDensityFractional) { + return pluginplay::declare_result(); +} } // namespace simde \ No newline at end of file From 1f9c8513f026792e3e3551c567d7b4a1098660ad Mon Sep 17 00:00:00 2001 From: Kevin Gasperich Date: Fri, 13 Jan 2023 15:04:38 -0600 Subject: [PATCH 3/3] add missing include --- include/simde/density/density.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/simde/density/density.hpp b/include/simde/density/density.hpp index d03f9440..bf702b41 100644 --- a/include/simde/density/density.hpp +++ b/include/simde/density/density.hpp @@ -17,3 +17,4 @@ #pragma once #include "simde/density/mp2_density.hpp" #include "simde/density/scf_density.hpp" +#include "simde/density/scf_density_fractional.hpp"