Skip to content

Commit

Permalink
Isotopes update.
Browse files Browse the repository at this point in the history
new medicinal isotopes added.
refactored.
  • Loading branch information
stsouko committed Jul 5, 2021
1 parent 0ba5060 commit 28aa9a5
Show file tree
Hide file tree
Showing 19 changed files with 276 additions and 307 deletions.
31 changes: 15 additions & 16 deletions CGRtools/periodictable/groupI.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019, 2020 Ramil Nugmanov <nougmanoff@protonmail.com>
# Copyright 2019-2021 Ramil Nugmanov <nougmanoff@protonmail.com>
# This file is part of CGRtools.
#
# CGRtools is free software; you can redistribute it and/or modify
Expand All @@ -16,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
from CachedMethods import FrozenDict
from .element import Element
from .groups import GroupI
from .periods import *
Expand All @@ -31,11 +30,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({1: 0.999885, 2: 0.000115, 3: 0.})
return {1: 0.999885, 2: 0.000115, 3: 0.}

@property
def isotopes_masses(self):
return FrozenDict({1: 1.007825, 2: 2.014102, 3: 3.016049})
return {1: 1.007825, 2: 2.014102, 3: 3.016049}

@property
def _common_valences(self):
Expand All @@ -59,11 +58,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({6: 0.0759, 7: 0.9241})
return {6: 0.0759, 7: 0.9241}

@property
def isotopes_masses(self):
return FrozenDict({6: 6.015122, 7: 7.016004})
return {6: 6.015122, 7: 7.016004}

@property
def _common_valences(self):
Expand All @@ -87,11 +86,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({23: 1.0})
return {22: 0., 23: 1.0}

@property
def isotopes_masses(self):
return FrozenDict({23: 22.98977})
return {22: 21.994437, 23: 22.98977}

@property
def _common_valences(self):
Expand All @@ -115,11 +114,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({39: 0.932581, 40: 0.000117, 41: 0.067302})
return {39: 0.932581, 40: 0.000117, 41: 0.067302, 42: 0.}

@property
def isotopes_masses(self):
return FrozenDict({39: 38.963707, 40: 39.963999, 41: 40.961826})
return {39: 38.963707, 40: 39.963999, 41: 40.961826, 42: 41.962402}

@property
def _common_valences(self):
Expand All @@ -143,11 +142,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({85: 0.7217, 87: 0.2783})
return {82: 0., 85: 0.7217, 87: 0.2783}

@property
def isotopes_masses(self):
return FrozenDict({85: 84.911789, 87: 86.909183})
return {82: 81.918209, 85: 84.911789, 87: 86.909183}

@property
def _common_valences(self):
Expand All @@ -171,11 +170,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({133: 1.0})
return {131: 0., 133: 1.0}

@property
def isotopes_masses(self):
return FrozenDict({133: 132.905447})
return {131: 130.905464, 133: 132.905447}

@property
def _common_valences(self):
Expand All @@ -199,11 +198,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({223: 1.0})
return {223: 1.0}

@property
def isotopes_masses(self):
return FrozenDict({223: 223.019736})
return {223: 223.019736}

@property
def _common_valences(self):
Expand Down
32 changes: 15 additions & 17 deletions CGRtools/periodictable/groupII.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019, 2020 Ramil Nugmanov <nougmanoff@protonmail.com>
# Copyright 2019-2021 Ramil Nugmanov <nougmanoff@protonmail.com>
# Copyright 2019 Tagir Akhmetshin <tagirshin@gmail.com>
# This file is part of CGRtools.
#
Expand All @@ -17,7 +17,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
from CachedMethods import FrozenDict
from .element import Element
from .groups import GroupII
from .periods import PeriodII, PeriodIII, PeriodIV, PeriodV, PeriodVI, PeriodVII
Expand All @@ -32,11 +31,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({9: 1.0})
return {9: 1.0}

@property
def isotopes_masses(self):
return FrozenDict({9: 9.012182})
return {9: 9.012182}

@property
def _common_valences(self):
Expand All @@ -60,11 +59,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({24: 0.7899, 25: 0.1, 26: 0.1101})
return {24: 0.7899, 25: 0.1, 26: 0.1101}

@property
def isotopes_masses(self):
return FrozenDict({24: 23.985042, 25: 24.985837, 26: 25.982593})
return {24: 23.985042, 25: 24.985837, 26: 25.982593}

@property
def _common_valences(self):
Expand Down Expand Up @@ -92,12 +91,12 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({40: 0.96941, 42: 0.00647, 43: 0.00135, 44: 0.02086, 46: 4e-05, 48: 0.00187, 45: 0.})
return {40: 0.96941, 42: 0.00647, 43: 0.00135, 44: 0.02086, 45: 0., 46: 4e-05, 47: 0., 48: 0.00187}

@property
def isotopes_masses(self):
return FrozenDict({40: 39.962591, 42: 41.958618, 43: 42.958767, 44: 43.955481, 46: 45.953693, 48: 47.952534,
45: 44.956186})
return {40: 39.962591, 42: 41.958618, 43: 42.958767, 44: 43.955481, 45: 44.956186, 46: 45.953693, 47: 46.954541,
48: 47.952534}

@property
def _common_valences(self):
Expand All @@ -121,11 +120,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({84: 0.0056, 86: 0.0986, 87: 0.07, 88: 0.8258})
return {84: 0.0056, 85: 0., 86: 0.0986, 87: 0.07, 88: 0.8258, 89: 0.}

@property
def isotopes_masses(self):
return FrozenDict({84: 83.913425, 86: 85.909262, 87: 86.908879, 88: 87.905614})
return {84: 83.913425, 85: 84.912933, 86: 85.909262, 87: 86.908879, 88: 87.905614, 89: 88.907451}

@property
def _common_valences(self):
Expand All @@ -149,13 +148,12 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({130: 0.00106, 132: 0.00101, 134: 0.02417, 135: 0.06592, 136: 0.07854, 137: 0.11232,
138: 0.71698})
return {130: 0.00106, 132: 0.00101, 134: 0.02417, 135: 0.06592, 136: 0.07854, 137: 0.11232, 138: 0.71698}

@property
def isotopes_masses(self):
return FrozenDict({130: 129.90631, 132: 131.905056, 134: 133.904503, 135: 134.905683, 136: 135.90457,
137: 136.905821, 138: 137.905241})
return {130: 129.90631, 132: 131.905056, 134: 133.904503, 135: 134.905683, 136: 135.90457, 137: 136.905821,
138: 137.905241}

@property
def _common_valences(self):
Expand All @@ -179,11 +177,11 @@ def atomic_number(self):

@property
def isotopes_distribution(self):
return FrozenDict({226: 1.0, 228: 0.})
return {223: 0., 226: 1.0, 228: 0.}

@property
def isotopes_masses(self):
return FrozenDict({226: 226.02541, 228: 228.031070})
return {223: 223.018502, 226: 226.025410, 228: 228.031070}

@property
def _common_valences(self):
Expand Down

0 comments on commit 28aa9a5

Please sign in to comment.