ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
Functions | Variables
src.chemistry Namespace Reference

Functions

def LookupByMass (mass)
 
def BondStrengthByLength (A, B, length, artol=0.33, bias=0.0)
 

Variables

 BondEnergies = defaultdict(lambda:defaultdict(dict))
 
list Radii
 Covalent radii from Cordero et al. More...
 
 PeriodicTable
 
list Elements
 
list BondChars = ['-','=','3']
 
string data_from_web
 
 line = line.expandtabs()
 
 BE = float(line.split()[1])
 
float L = float(line.split()[2]) * 0.01
 
 atoms = re.split('[-=3]', line.split()[0])
 
 A = atoms[0]
 
 B = atoms[1]
 
list bo = BondChars.index(re.findall('[-=3]', line.split()[0])[0]) + 1
 

Function Documentation

◆ BondStrengthByLength()

def src.chemistry.BondStrengthByLength (   A,
  B,
  length,
  artol = 0.33,
  bias = 0.0 
)

Definition at line 169 of file chemistry.py.

◆ LookupByMass()

def src.chemistry.LookupByMass (   mass)

Definition at line 160 of file chemistry.py.

Variable Documentation

◆ A

src.chemistry.A = atoms[0]

Definition at line 154 of file chemistry.py.

◆ atoms

src.chemistry.atoms = re.split('[-=3]', line.split()[0])

Definition at line 153 of file chemistry.py.

◆ B

src.chemistry.B = atoms[1]

Definition at line 155 of file chemistry.py.

◆ BE

src.chemistry.BE = float(line.split()[1])

Definition at line 151 of file chemistry.py.

◆ bo

list src.chemistry.bo = BondChars.index(re.findall('[-=3]', line.split()[0])[0]) + 1

Definition at line 156 of file chemistry.py.

◆ BondChars

list src.chemistry.BondChars = ['-','=','3']

Definition at line 51 of file chemistry.py.

◆ BondEnergies

src.chemistry.BondEnergies = defaultdict(lambda:defaultdict(dict))

Definition at line 8 of file chemistry.py.

◆ data_from_web

string src.chemistry.data_from_web

Definition at line 56 of file chemistry.py.

◆ Elements

list src.chemistry.Elements
Initial value:
1 = ["None",'H','He',
2  'Li','Be','B','C','N','O','F','Ne',
3  'Na','Mg','Al','Si','P','S','Cl','Ar',
4  'K','Ca','Sc','Ti','V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se','Br','Kr',
5  'Rb','Sr','Y','Zr','Nb','Mo','Tc','Ru','Rh','Pd','Ag','Cd','In','Sn','Sb','Te','I','Xe',
6  'Cs','Ba','La','Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb',
7  'Lu','Hf','Ta','W','Re','Os','Ir','Pt','Au','Hg','Tl','Pb','Bi','Po','At','Rn',
8  'Fr','Ra','Ac','Th','Pa','U','Np','Pu','Am','Cm','Bk','Cf','Es','Fm','Md','No','Lr','Rf','Db','Sg','Bh','Hs','Mt']

Definition at line 42 of file chemistry.py.

◆ L

float src.chemistry.L = float(line.split()[2]) * 0.01

Definition at line 152 of file chemistry.py.

◆ line

src.chemistry.line = line.expandtabs()

Definition at line 150 of file chemistry.py.

◆ PeriodicTable

src.chemistry.PeriodicTable
Initial value:
1 = OrderedDict([('H',1.0079),('He',4.0026),
2  ('Li',6.941),('Be',9.0122),('B',10.811),('C',12.0107),('N',14.0067),('O',15.9994),('F',18.9984),('Ne',20.1797),
3  ('Na',22.9897),('Mg',24.305),('Al',26.9815),('Si',28.0855),('P',30.9738),('S',32.065),('Cl',35.453),('Ar',39.948),
4  ('K',39.0983),('Ca',40.078),('Sc',44.9559),('Ti',47.867),('V',50.9415),('Cr',51.9961),('Mn',54.938),('Fe',55.845),('Co',58.9332),
5  ('Ni',58.6934),('Cu',63.546),('Zn',65.39),('Ga',69.723),('Ge',72.64),('As',74.9216),('Se',78.96),('Br',79.904),('Kr',83.8),
6  ('Rb',85.4678),('Sr',87.62),('Y',88.9059),('Zr',91.224),('Nb',92.9064),('Mo',95.94),('Tc',98),('Ru',101.07),('Rh',102.9055),
7  ('Pd',106.42),('Ag',107.8682),('Cd',112.411),('In',114.818),('Sn',118.71),('Sb',121.76),('Te',127.6),('I',126.9045),('Xe',131.293),
8  ('Cs',132.9055),('Ba',137.327),('La',138.9055),('Ce',140.116),('Pr',140.9077),('Nd',144.24),('Pm',145),('Sm',150.36),
9  ('Eu',151.964),('Gd',157.25),('Tb',158.9253),('Dy',162.5),('Ho',164.9303),('Er',167.259),('Tm',168.9342),('Yb',173.04),
10  ('Lu',174.967),('Hf',178.49),('Ta',180.9479),('W',183.84),('Re',186.207),('Os',190.23),('Ir',192.217),('Pt',195.078),
11  ('Au',196.9665),('Hg',200.59),('Tl',204.3833),('Pb',207.2),('Bi',208.9804),('Po',209),('At',210),('Rn',222),
12  ('Fr',223),('Ra',226),('Ac',227),('Th',232.0381),('Pa',231.0359),('U',238.0289),('Np',237),('Pu',244),
13  ('Am',243),('Cm',247),('Bk',247),('Cf',251),('Es',252),('Fm',257),('Md',258),('No',259),
14  ('Lr',262),('Rf',261),('Db',262),('Sg',266),('Bh',264),('Hs',277),('Mt',268)])

Definition at line 27 of file chemistry.py.

◆ Radii

list src.chemistry.Radii
Initial value:
1 = [0.31, 0.28, # H and He
2  1.28, 0.96, 0.84, 0.76, 0.71, 0.66, 0.57, 0.58, # First row elements
3  0.0, 1.41, 1.21, 1.11, 1.07, 1.05, 1.02, 1.06, # Second row elements
4  2.03, 1.76, 1.70, 1.60, 1.53, 1.39, 1.61, 1.52, 1.50,
5  1.24, 1.32, 1.22, 1.22, 1.20, 1.19, 1.20, 1.20, 1.16, # Third row elements, K through Kr
6  2.20, 1.95, 1.90, 1.75, 1.64, 1.54, 1.47, 1.46, 1.42,
7  1.39, 1.45, 1.44, 1.42, 1.39, 1.39, 1.38, 1.39, 1.40, # Fourth row elements, Rb through Xe
8  2.44, 2.15, 2.07, 2.04, 2.03, 2.01, 1.99, 1.98,
9  1.98, 1.96, 1.94, 1.92, 1.92, 1.89, 1.90, 1.87, # Fifth row elements, s and f blocks
10  1.87, 1.75, 1.70, 1.62, 1.51, 1.44, 1.41, 1.36,
11  1.36, 1.32, 1.45, 1.46, 1.48, 1.40, 1.50, 1.50, # Fifth row elements, d and p blocks
12  2.60, 2.21, 2.15, 2.06, 2.00, 1.96, 1.90, 1.87, 1.80, 1.69]

Covalent radii from Cordero et al.

'Covalent radii revisited' Dalton Transactions 2008, 2832-2838. Sodium replaced 1.66 -> 1.0. I think ionic radii are more appropriate.

Definition at line 12 of file chemistry.py.