Skip to content

Commit

Permalink
Merge pull request #289 from MolSSI-BSE/aux_fix
Browse files Browse the repository at this point in the history
Allow for multiple basis sets in auxiliary dictionaries
  • Loading branch information
bennybp authored Nov 10, 2023
2 parents c0340c6 + b43a8c2 commit c8175f9
Show file tree
Hide file tree
Showing 21 changed files with 171 additions and 146 deletions.
6 changes: 5 additions & 1 deletion basis_set_exchange/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ def lookup_basis_by_role(primary_basis, role, data_dir=None):
if role not in auxdata:
raise RuntimeError("Role {} doesn't exist for {}".format(role, primary_basis))

return auxdata[role]
if isinstance(auxdata[role], str):
return [auxdata[role]]
else:
# Also handles other sequence types
return list(auxdata[role])


@memo.BSEMemoize
Expand Down
4 changes: 3 additions & 1 deletion basis_set_exchange/cli/bse_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def _bse_cli_get_data_dir(args):

def _bse_cli_lookup_by_role(args):
'''Handles the lookup-by-role subcommand'''
return api.lookup_basis_by_role(args.basis, args.role, args.data_dir)

bs_names = api.lookup_basis_by_role(args.basis, args.role, args.data_dir)
return '\n'.join(bs_names)


def _bse_cli_get_basis(args):
Expand Down
15 changes: 12 additions & 3 deletions basis_set_exchange/data/METADATA.json
Original file line number Diff line number Diff line change
Expand Up @@ -17833,7 +17833,10 @@
"gto_spherical"
],
"auxiliaries": {
"optri": "cc-pvdz-f12-optri+"
"optri": [
"cc-pvdz-f12-optri",
"cc-pvdz-f12-optri+"
]
},
"versions": {
"0": {
Expand Down Expand Up @@ -18794,7 +18797,10 @@
"gto_spherical"
],
"auxiliaries": {
"optri": "cc-pvqz-f12-optri+"
"optri": [
"cc-pvqz-f12-optri",
"cc-pvqz-f12-optri+"
]
},
"versions": {
"0": {
Expand Down Expand Up @@ -19845,7 +19851,10 @@
"gto_spherical"
],
"auxiliaries": {
"optri": "cc-pvtz-f12-optri+"
"optri": [
"cc-pvtz-f12-optri",
"cc-pvtz-f12-optri+"
]
},
"versions": {
"0": {
Expand Down
38 changes: 19 additions & 19 deletions basis_set_exchange/data/cc-pVDZ-F12-OPTRI+.1.table.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"revision_description": "Data from Grant Hill's ccRepo",
"revision_date": "2021-02-25",
"elements": {
"1": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"2": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"3": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"4": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"5": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"6": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"7": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"8": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"9": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"10": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"11": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"12": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"13": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"14": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"15": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"16": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"17": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"18": "dunning_fit/cc-pVDZ-F12-OPTRI+.1.element.json"
"1": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"2": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"3": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"4": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"5": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"6": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"7": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"8": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"9": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"10": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"11": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"12": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"13": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"14": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"15": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"16": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"17": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json",
"18": "dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.element.json"
}
}
}
3 changes: 1 addition & 2 deletions basis_set_exchange/data/cc-pVDZ-F12.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"description": "VDZ for explicitly correlated F12 variants of wavefunction methods",
"role": "orbital",
"auxiliaries": {
"optri": "cc-pvdz-f12-optri",
"optri": "cc-pvdz-f12-optri+"
"optri": ["cc-pvdz-f12-optri", "cc-pvdz-f12-optri+"]
}
}
38 changes: 19 additions & 19 deletions basis_set_exchange/data/cc-pVQZ-F12-OPTRI+.1.table.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"revision_description": "Data from Grant Hill's ccRepo",
"revision_date": "2021-02-25",
"elements": {
"1": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"2": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"3": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"4": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"5": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"6": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"7": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"8": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"9": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"10": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"11": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"12": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"13": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"14": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"15": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"16": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"17": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"18": "dunning_fit/cc-pVQZ-F12-OPTRI+.1.element.json"
"1": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"2": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"3": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"4": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"5": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"6": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"7": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"8": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"9": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"10": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"11": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"12": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"13": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"14": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"15": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"16": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"17": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json",
"18": "dunning_f12_fit/cc-pVQZ-F12-OPTRI+.1.element.json"
}
}
}
2 changes: 1 addition & 1 deletion basis_set_exchange/data/cc-pVQZ-F12-OPTRI+.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"description": "cc-pVQZ-F12-OPTRI+",
"role": "optri",
"auxiliaries": {}
}
}
3 changes: 1 addition & 2 deletions basis_set_exchange/data/cc-pVQZ-F12.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"description": "VQZ for explicitly correlated F12 variants of wavefunction methods",
"role": "orbital",
"auxiliaries": {
"optri": "cc-pvqz-f12-optri",
"optri": "cc-pvqz-f12-optri+"
"optri": ["cc-pvqz-f12-optri", "cc-pvqz-f12-optri+"]
}
}
38 changes: 19 additions & 19 deletions basis_set_exchange/data/cc-pVTZ-F12-OPTRI+.1.table.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"revision_description": "Data from Grant Hill's ccRepo",
"revision_date": "2021-02-25",
"elements": {
"1": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"2": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"3": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"4": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"5": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"6": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"7": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"8": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"9": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"10": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"11": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"12": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"13": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"14": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"15": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"16": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"17": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"18": "dunning_fit/cc-pVTZ-F12-OPTRI+.1.element.json"
"1": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"2": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"3": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"4": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"5": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"6": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"7": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"8": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"9": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"10": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"11": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"12": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"13": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"14": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"15": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"16": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"17": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json",
"18": "dunning_f12_fit/cc-pVTZ-F12-OPTRI+.1.element.json"
}
}
}
3 changes: 1 addition & 2 deletions basis_set_exchange/data/cc-pVTZ-F12.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"description": "VTZ for explicitly correlated F12 variants of wavefunction methods",
"role": "orbital",
"auxiliaries": {
"optri": "cc-pvtz-f12-optri",
"optri": "cc-pvtz-f12-optri+"
"optri": ["cc-pvtz-f12-optri", "cc-pvtz-f12-optri+"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,93 +8,93 @@
"elements": {
"1": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"2": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"3": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"4": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"5": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"6": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"7": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"8": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"9": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"10": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"11": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"12": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"13": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"14": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"15": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"16": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"17": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
},
"18": {
"components": [
"dunning_fit/cc-pVDZ-F12-OPTRI+.1.json"
"dunning_f12_fit/cc-pVDZ-F12-OPTRI+.1.json"
]
}
}
}
}
Loading

0 comments on commit c8175f9

Please sign in to comment.