-
Notifications
You must be signed in to change notification settings - Fork 1
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 #27 from JacksonBurns/radii_dict_dev
Make Radii Table Modular via Argument
- Loading branch information
Showing
9 changed files
with
179 additions
and
114 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
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
__all__ = ["p2s"] | ||
|
||
__version__ = "1.3.4" | ||
__version__ = "1.4.0" |
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,10 @@ | ||
from py2sambvca.radii_tables.default import default_radii_table | ||
from py2sambvca.radii_tables.vanDerWaals import vdw_radii_table | ||
from py2sambvca.radii_tables.format_table import format_radii_table | ||
|
||
table_lookup = { | ||
"default": default_radii_table, | ||
"vdw": vdw_radii_table, | ||
} | ||
|
||
__all__ = ["format_radii_table", "table_lookup"] |
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,107 @@ | ||
# These are the radii used in the original Cavallo paper, which are just the vDW | ||
# radii multiplied by 1.17 | ||
default_radii_table = { | ||
"H": 1.28, | ||
"HE": 1.64, | ||
"LI": 2.13, | ||
"BE": 1.79, | ||
"B": 2.25, | ||
"C": 1.99, | ||
"N": 1.81, | ||
"O": 1.78, | ||
"F": 1.72, | ||
"NE": 1.80, | ||
"NA": 2.66, | ||
"MG": 2.02, | ||
"AL": 2.15, | ||
"SI": 2.46, | ||
"P": 2.11, | ||
"S": 2.11, | ||
"CL": 2.05, | ||
"AR": 2.20, | ||
"K": 3.22, | ||
"CA": 2.70, | ||
"SC": 2.52, | ||
"TI": 2.47, | ||
"V": 2.42, | ||
"CR": 2.41, | ||
"MN": 2.40, | ||
"FE": 2.39, | ||
"CO": 2.34, | ||
"NI": 1.91, | ||
"CU": 1.64, | ||
"ZN": 1.63, | ||
"GA": 2.19, | ||
"GE": 2.47, | ||
"AS": 2.16, | ||
"SE": 2.22, | ||
"BR": 2.16, | ||
"KR": 2.36, | ||
"RB": 3.55, | ||
"SR": 2.91, | ||
"Y": 2.71, | ||
"ZR": 2.61, | ||
"NB": 2.55, | ||
"MO": 2.54, | ||
"TC": 2.53, | ||
"RU": 2.49, | ||
"RH": 2.46, | ||
"PD": 1.91, | ||
"AG": 2.01, | ||
"CD": 1.85, | ||
"IN": 2.26, | ||
"SN": 2.54, | ||
"SB": 2.41, | ||
"TE": 2.41, | ||
"I": 2.32, | ||
"XE": 2.53, | ||
"CS": 4.01, | ||
"BA": 3.14, | ||
"LA": 2.84, | ||
"CE": 2.83, | ||
"PR": 2.81, | ||
"ND": 2.80, | ||
"PM": 2.78, | ||
"SM": 2.76, | ||
"EU": 2.75, | ||
"GD": 2.74, | ||
"TB": 2.73, | ||
"DY": 2.70, | ||
"HO": 2.69, | ||
"ER": 2.68, | ||
"TM": 2.66, | ||
"YB": 2.64, | ||
"LU": 2.62, | ||
"HF": 2.61, | ||
"TA": 2.60, | ||
"W": 2.55, | ||
"RE": 2.53, | ||
"OS": 2.53, | ||
"IR": 2.49, | ||
"PT": 2.01, | ||
"AU": 1.94, | ||
"HG": 1.81, | ||
"TL": 2.29, | ||
"PB": 2.36, | ||
"BI": 2.42, | ||
"PO": 2.30, | ||
"AT": 2.36, | ||
"RN": 2.57, | ||
"FR": 4.07, | ||
"RA": 3.31, | ||
"AC": 2.89, | ||
"TH": 2.87, | ||
"PA": 2.84, | ||
"U": 2.18, | ||
"NP": 2.80, | ||
"PU": 2.84, | ||
"AM": 2.85, | ||
"CM": 2.87, | ||
"BK": 2.85, | ||
"CF": 2.87, | ||
"ES": 2.87, | ||
"FM": 2.87, | ||
"M": 2.88, | ||
"NO": 2.88, | ||
"LR": 2.88, | ||
} |
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,20 @@ | ||
def format_radii_table(radii_table: dict): | ||
"""Formats a dictionary of atomic symbol: radii to a list of strings for sambvca | ||
Args: | ||
radii_table (dict): Mapping of atomic symbols to radii, i.e. {'H':1.0,'LI':1.1} | ||
""" | ||
output_list = [] | ||
for element, radius in radii_table.items(): | ||
# sambvca expects each row in the radii table to look like this: | ||
# "C 1.11" with _exactly_ six spaces for elements with two letter | ||
# abbreviations and _exactly_ seven for elements with one letter | ||
# abbreviations, and then three digits for the radius | ||
output_list.append( | ||
element | ||
+ (" " if len(element) == 1 else "") | ||
+ " " | ||
+ str(round(radius, 2)) | ||
+ "\n" | ||
) | ||
return output_list |
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,8 @@ | ||
# this radius table just returns to the plain old van Der Waals radii, | ||
# which are the radii reported in the original Cavallo paper divided by | ||
# 1.17 | ||
from py2sambvca.radii_tables.default import default_radii_table | ||
|
||
vdw_radii_table = { | ||
element: radius / 1.17 for element, radius in default_radii_table.items() | ||
} |
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