-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from NWChemEx/pt_bindings
Python bindings for property types
- Loading branch information
Showing
18 changed files
with
440 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2023 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 "../export_simde.hpp" | ||
#include <pluginplay/pluginplay.hpp> | ||
#include <simde/atoms/atoms.hpp> | ||
|
||
namespace simde { | ||
|
||
inline void export_atoms(python_module_reference m) { | ||
EXPORT_PROPERTY_TYPE(AtomFromZ, m); | ||
EXPORT_PROPERTY_TYPE(AtomFromSym, m); | ||
EXPORT_PROPERTY_TYPE(AtomDenFromZ, m); | ||
EXPORT_PROPERTY_TYPE(AtomDenFromSym, m); | ||
EXPORT_PROPERTY_TYPE(ElecConfigFromZ, m); | ||
EXPORT_PROPERTY_TYPE(ElecConfigFromSym, m); | ||
EXPORT_PROPERTY_TYPE(FracConfigFromZ, m); | ||
EXPORT_PROPERTY_TYPE(FracConfigFromSym, m); | ||
EXPORT_PROPERTY_TYPE(FullConfigFromZ, m); | ||
EXPORT_PROPERTY_TYPE(FullConfigFromSym, m); | ||
EXPORT_PROPERTY_TYPE(SymbolFromZ, m); | ||
EXPORT_PROPERTY_TYPE(ZFromSymbol, m); | ||
} | ||
|
||
} // namespace simde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2023 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 "../export_simde.hpp" | ||
#include <pluginplay/pluginplay.hpp> | ||
#include <simde/density/density.hpp> | ||
|
||
namespace simde { | ||
|
||
inline void export_density(python_module_reference m) { | ||
EXPORT_PROPERTY_TYPE(SCFDensity, m); | ||
EXPORT_PROPERTY_TYPE(InitialDensity, m); | ||
EXPORT_PROPERTY_TYPE(SCFGuessDensity, m); | ||
EXPORT_PROPERTY_TYPE(SCFDensityStep, m); | ||
} | ||
|
||
} // namespace simde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2023 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 "../export_simde.hpp" | ||
#include <pluginplay/pluginplay.hpp> | ||
#include <simde/derivative/derivative.hpp> | ||
|
||
namespace simde { | ||
|
||
inline void export_derivative(python_module_reference m) { | ||
EXPORT_PROPERTY_TYPE(AOEnergyNuclearGradient, m); | ||
EXPORT_PROPERTY_TYPE(AOEnergyNuclearHessian, m); | ||
} | ||
|
||
} // namespace simde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2023 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 "../export_simde.hpp" | ||
#include <pluginplay/pluginplay.hpp> | ||
#include <simde/operators/operators.hpp> | ||
|
||
namespace simde { | ||
|
||
inline void export_operators(python_module_reference m) { | ||
EXPORT_PROPERTY_TYPE(FockOp, m); | ||
EXPORT_PROPERTY_TYPE(SystemHamiltonian, m); | ||
} | ||
|
||
} // namespace simde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2023 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Copyright 2023 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. | ||
|
||
import simde | ||
from test_property_type import BaseTestPropertyType | ||
|
||
class TestAtomFromZ(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.AtomFromZ() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Atom'] | ||
|
||
class TestAtomFromSym(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.AtomFromSym() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Atom'] | ||
|
||
class TestAtomDenFromZ(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.AtomDenFromZ() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Atomic Density'] | ||
|
||
class TestAtomDenFromSym(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.AtomDenFromSym() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Atomic Density'] | ||
|
||
class TestElecConfigFromZ(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.ElecConfigFromZ() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Electronic Configuration'] | ||
|
||
class TestElecConfigFromSym(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.ElecConfigFromSym() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Electronic Configuration'] | ||
|
||
class TestFracConfigFromZ(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.FracConfigFromZ() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Electronic Configuration'] | ||
|
||
class TestFracConfigFromSym(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.FracConfigFromSym() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Electronic Configuration'] | ||
|
||
class TestFullConfigFromZ(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.FullConfigFromZ() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Electronic Configuration'] | ||
|
||
class TestFullConfigFromSym(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.FullConfigFromSym() | ||
self.input_labels = ['Atom ID'] | ||
self.result_labels = ['Electronic Configuration'] | ||
|
||
class testSymbolFromZ(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.SymbolFromZ() | ||
self.input_labels = ['Z'] | ||
self.result_labels = ['Symbol'] | ||
|
||
class testZFromSymbol(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.ZFromSymbol() | ||
self.input_labels = ['Symbol'] | ||
self.result_labels = ['Z'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2023 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2023 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. | ||
|
||
import simde | ||
from test_property_type import BaseTestPropertyType | ||
|
||
class TestSCFDensity(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.SCFDensity() | ||
self.input_labels = ['Phi0'] | ||
self.result_labels = ['Density'] | ||
|
||
class TestInitialDensity(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.InitialDensity() | ||
self.input_labels = ['Hamiltonian'] | ||
self.result_labels = ['Density'] | ||
|
||
class TestSCFGuessDensity(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.SCFGuessDensity() | ||
self.input_labels = ['Hamiltonian', 'Input Space'] | ||
self.result_labels = ['Output Density'] | ||
|
||
class TestSCFDensityStep(BaseTestPropertyType): | ||
def setUp(self): | ||
self.pt = simde.SCFDensityStep() | ||
self.input_labels = ['Hamiltonian', 'Input Space'] | ||
self.result_labels = ['Output Density'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2023 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. |
Oops, something went wrong.