-
Notifications
You must be signed in to change notification settings - Fork 1
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
Changes from 8 commits
d436e95
022c1fa
bf1f6f4
af88624
0a9d98b
a204ec4
a325753
8866ab7
c7b078a
1208e88
fbc13f9
ddab789
8c6ae1a
c94e995
a007e1e
62de243
c12adac
52d6b9a
646430c
cca109f
42f4f38
0f92eb9
e8fb5ef
4826f0c
c5141ab
23d7615
9ef13ea
80c8b64
4ac1076
10e782c
5c15e97
2fd6398
c9d6118
816c7ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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. | ||
""", | ||
) | ||
|
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
description=""" | ||
Name of the main basis set. | ||
""", | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the distinction between |
||
|
||
aux_c_basis_set = Quantity( | ||
type=str, | ||
description=""" | ||
AuxC type of basis set. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
""", | ||
) | ||
|
||
functional_composition = SubSection( | ||
sub_section=AtomCenteredFunction.m_def, repeats=True | ||
) # TODO change name | ||
|
@@ -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): | ||
""" | ||
|
There was a problem hiding this comment.
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.