#!/usr/bin/perl # This script is copyright (c) 2019 by WebMO, LLC, all rights reserved. # Its use is subject to the license agreement that can be found at the following # URL: http://www.webmo.net/license package AtomProperties; my @AtomSymbols = ( "","H","He","Li","Be","B","C","N","O","F","Ne", "Na","Mg","Al","Si","P","S","Cl","Ar","K","Ca", "Sc","Ti","V","Cr","Mn","Fe","Co","Ni","Cu","Zn", "Ga","Ge","As","Se","Br","Kr","Rb","Sr","Y","Zr", "Nb","Mo","Tc","Ru","Rh","Pd","Ag","Cd","In","Sn", "Sb","Te","I","Xe","Cs","Ba","La","Ce","Pr","Nd", "Pm","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb", "Lu","Hf","Ta","W","Re","Os","Ir","Pt","Au","Hg", "Tl","Pb","Bi","Po","At","Rn","Fr","Ra","Ac","Th", "Pa","U","Np","Pu","Am","Cm","Bk","Cf","Es","Fm"); my %AtomNumbers; for (my $i = 0; $i < @AtomSymbols; $i++) { $AtomNumbers{$AtomSymbols[$i]} = $i; } my @AtomRadii = ( 0.000000,0.320000,0.930000,1.230000,0.900000,0.800000, 0.770000,0.750000,0.730000,0.720000,0.710000,1.54, 1.36,1.18,1.110000,1.060000,1.020000,0.990000,0.98, 2.03,1.74,1.44,1.32,1.22,1.18,1.17,1.17,1.16,1.17, 1.20,1.25,1.26,1.22,1.20,1.16,1.140000,1.12,2.18, 1.91,1.62,1.45,1.34,1.30,1.27,1.25,1.25,1.28,1.34, 1.43,1.44,1.41,1.40,1.36,1.330000,1.31,2.28,2.01, 1.70,1.65,1.65,1.64,1.63,1.62,1.62,1.61,1.59,1.59, 1.58,1.57,1.56,1.56,1.56,1.42,1.38,1.35,1.33,1.33, 1.36,1.42,1.48,1.49,1.50,1.47,1.44,1.42,1.40,1.38, 2.35,2.03,1.73,1.70,1.70,1.69,1.68,1.67,1.66,1.64, 1.63,1.62,1.61,1.61); my @AtomMass = ( 0.0,1.01,4.00,6.94,9.01,10.81,12.01,14.01,16.00, 19.00,20.18,22.99,24.31,26.98,28.09,30.97, 32.06,35.45,39.95,39.10,40.08,44.96,47.88,50.94, 52.00,54.94,55.85,58.93,58.69,63.55,65.39,69.72, 72.61,74.92,78.96,79.90,83.60,85.47,87.62,88.91, 91.22,92.91,95.94,97.91,101.10,102.90,106.40,107.90, 112.40,114.80,118.70,121.75,127.60,126.90,131.30,132.90, 137.30,138.90,140.10,140.90,144.20,144.90,150.40,152.00, 157.20,158.90,162.50,164.90,167.30,168.90,173.00,175.00, 178.50,180.90,183.90,186.20,190.20,192.20,195.10,197.00, 200.60,204.40,207.20,209.00,209.00,210.00,222.00,223.00, 226.00,227.00,232.00,231.00,238.00,237.00,244.10,243.10, 247.10,247.10,242.10,252.10,257.10,258.10,259.10,262.10); sub GetSymbol { my ($atomicNumber) = @_; return $AtomSymbols[$atomicNumber]; } sub GetNumber { my ($atomicSymbol) = @_; return $AtomNumbers{ucfirst lc $atomicSymbol}; } sub GetRadius { my ($atomicNumber) = @_; return $AtomRadii[$atomicNumber]; } sub GetMass { my ($atomicNumber) = @_; return $AtomMass[$atomicNumber]; } 1;