Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add atom centered basis set #132

Closed
wants to merge 34 commits into from
Closed
Changes from 8 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d436e95
add main and auxiliary basis set quantities to AtomCenteredBasisSet
EBB2675 Sep 24, 2024
022c1fa
formatting
EBB2675 Sep 24, 2024
bf1f6f4
Merge branch 'develop' into coupled_cluster
EBB2675 Sep 25, 2024
af88624
add a draft for AtomCenteredFunction
EBB2675 Sep 25, 2024
0a9d98b
add a quantity for number of primitives
EBB2675 Sep 25, 2024
a204ec4
add atoms_state reference to AtomCenteredBasisSet
EBB2675 Sep 26, 2024
a325753
Merge remote-tracking branch 'origin/develop' into 130-atom-centered-…
EBB2675 Oct 1, 2024
8866ab7
assign JSON format to basis set
EBB2675 Oct 2, 2024
c7b078a
add type and auxiliary_type quantities to AtomCenteredBasisSet
EBB2675 Oct 8, 2024
1208e88
reformatted basis_set.py
EBB2675 Oct 8, 2024
fbc13f9
add NAO and point charges to basis set types
EBB2675 Oct 8, 2024
ddab789
add cECPs and pointcharges to AtomCenteredBasisSet
EBB2675 Oct 9, 2024
8c6ae1a
fix point charge Quantity type
EBB2675 Oct 11, 2024
c94e995
a bit of a cleanup
EBB2675 Oct 14, 2024
a007e1e
merge develop
EBB2675 Oct 18, 2024
62de243
move GTOIntegralDecomposition to NumericalSettings
EBB2675 Oct 24, 2024
c12adac
Merge branch 'develop' into 130-atom-centered-basis-set
EBB2675 Nov 19, 2024
52d6b9a
merge develop
EBB2675 Nov 19, 2024
646430c
add Mesh, NumericalIntegration and MolecularHamiltonianSubTerms
EBB2675 Nov 19, 2024
cca109f
minor adjustments to Mesh and NumericalIntegration
EBB2675 Nov 19, 2024
42f4f38
add integration_thresh and weight_cutoff to NumericalIntegration
EBB2675 Nov 20, 2024
0f92eb9
check whether n_primitive matches the lengths of exponents and contra…
EBB2675 Nov 20, 2024
e8fb5ef
add tests for AtomCenteredBasisSet and AtomCenteredFunction
EBB2675 Nov 20, 2024
4826f0c
add tests for Mesh and NumericalIntegration
EBB2675 Nov 20, 2024
c5141ab
modify Mesh
EBB2675 Nov 20, 2024
23d7615
MEnum for MolecularHamiltonianContributions
EBB2675 Nov 21, 2024
9ef13ea
remove contributions
EBB2675 Nov 21, 2024
80c8b64
add a normalizer function for the AtomCenteredFunction to handle comb…
EBB2675 Nov 28, 2024
4ac1076
fix test_basis_set.py
EBB2675 Dec 4, 2024
10e782c
add OrbitalLocalization to numerical_settings.py
EBB2675 Dec 4, 2024
5c15e97
add method to LocalCorrelation
EBB2675 Dec 4, 2024
2fd6398
add total_charge and total_spin to ModelSystem
EBB2675 Dec 5, 2024
c9d6118
add a simple HF class
EBB2675 Dec 10, 2024
816c7ba
a placeholder for MO and LCAO
EBB2675 Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 110 additions & 4 deletions src/nomad_simulations/schema_packages/basis_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from nomad import utils
from nomad.datamodel.data import ArchiveSection
from nomad.datamodel.metainfo.annotations import ELNAnnotation
from nomad.metainfo import MEnum, Quantity, SubSection
from nomad.metainfo import MEnum, Quantity, SubSection, JSON
from nomad.units import ureg

from nomad_simulations.schema_packages.atoms_state import AtomsState
Expand Down Expand Up @@ -190,16 +190,122 @@ class AtomCenteredFunction(ArchiveSection):
Specifies a single function (term) in an atom-centered basis set.
"""

pass
function_type = Quantity(
type=MEnum('s', 'p', 'd', 'f', 'g', 'h', 'i', 'j'),
description="""
the angular momentum of the shell to be added.
""",
)

n_primitive = Quantity(
type=int,
description="""
Number of primitives.
""",
)

exponents = Quantity(
type=np.float32,
shape=['n_primitive'],
description="""
List of exponents for the basis function.
""",
)

contraction_coefficients = Quantity(
type=np.float32,
shape=['n_primitive'],
description="""
List of contraction coefficients corresponding to the exponents.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would elaborate a bit more here, keeping also non-experts in mind.

""",
)

def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
super().normalize(archive, logger)
# self.name = self.m_def.name

class AtomCenteredBasisSet(BasisSetComponent):
"""
Defines an atom-centered basis set, using a single JSON quantity for all basis set types,
while allowing different AtomState references for each basis set type.
"""

basis_set_data = Quantity(
type=JSON, # Use JSON to store basis set information, including atom references
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EBB2675 did you see my comment about this? it came up in my GH notifications, but I am not sure where it was stored. The comment was about using a repeating sub-section here instead of JSON

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JFRudzinski I have just seen it (but only in the notification E-mail)

Alright, im on it 👍

description="""
JSON object containing all the basis set information along with atom references. Example:
{
"main_basis_set": {
"name": "cc-pVTZ",
"atoms_ref": [ref_to_atoms_1, ref_to_atoms_2]
},
"aux_c_basis_set": {
"name": "cc-pVTZ/C",
"atoms_ref": [ref_to_atoms_3]
},
"aux_j_basis_set": {
"name": "RIJ",
"atoms_ref": [ref_to_atoms_4]
},
"aux_jk_basis_set": {
"name": "aug-cc-pVTZ/JK",
"atoms_ref": [ref_to_atoms_1, ref_to_atoms_5]
}
}
""",
)

functional_composition = SubSection(
sub_section=AtomCenteredFunction.m_def, repeats=True
)

def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
super().normalize(archive, logger)

# TODO: design system for writing basis functions like gaussian or slater orbitals


'''
class AtomCenteredBasisSet(BasisSetComponent):
"""
Defines an atom-centered basis set.
"""

main_basis_set = Quantity(
type=str,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think str is fine for now, we'll likely want to constrain the choice here down the line.

description="""
Name of the main basis set.
""",
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the distinction between main and aux? If it's method routines, you can use BasisSetContainer to distinguish them.


aux_c_basis_set = Quantity(
type=str,
description="""
AuxC type of basis set.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would also be good to elaborate on the description here.

""",
)

aux_j_basis_set = Quantity(
type=str,
description="""
AuxJ type of basis set.
""",
)

aux_jk_basis_set = Quantity(
type=str,
description="""
AuxJK type of basis set.
""",
)

atoms_ref = Quantity(
type=AtomsState,
shape=['*'],
description="""
References to the `AtomsState` sections that define the atoms this basis set applies to.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connected to my comment in the issue, you might also want a map to a ModelSystem.
For simplicity sake, I'd try to use only 1 type of linker when possible. Convenience can be added in other ways.

""",
)

functional_composition = SubSection(
sub_section=AtomCenteredFunction.m_def, repeats=True
) # TODO change name
Expand All @@ -209,7 +315,7 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
# self.name = self.m_def.name
# TODO: set name based on basis functions
# ? use basis set names from Basis Set Exchange

'''

class APWBaseOrbital(ArchiveSection):
"""
Expand Down
Loading