Author: bugman Date: Thu Mar 8 06:40:11 2007 New Revision: 3112 URL: http://svn.gna.org/viewcvs/relax?rev=3112&view=rev Log: Shifted the physical constants h, hbar, and mu0 from the PipeContainer class to their own module. Added: 1.3/physical_constants.py Modified: 1.3/data/pipe_container.py Modified: 1.3/data/pipe_container.py URL: http://svn.gna.org/viewcvs/relax/1.3/data/pipe_container.py?rev=3112&r1=3111&r2=3112&view=diff ============================================================================== --- 1.3/data/pipe_container.py (original) +++ 1.3/data/pipe_container.py Thu Mar 8 06:40:11 2007 @@ -21,7 +21,6 @@ ############################################################################### # Python module imports. -from math import pi from re import match, search from types import DictType, ListType @@ -34,12 +33,6 @@ class PipeContainer: def __init__(self): """Class containing all the program data.""" - - # Fundamental constants. - #self.h = 6.6260755e-34 # Old low precision value. - self.h = 6.62606876e-34 - self.h_bar = self.h / ( 2.0*pi ) - self.mu0 = 4.0 * pi * 1e-7 # PDB data. self.pdb = SpecificData() Added: 1.3/physical_constants.py URL: http://svn.gna.org/viewcvs/relax/1.3/physical_constants.py?rev=3112&view=auto ============================================================================== --- 1.3/physical_constants.py (added) +++ 1.3/physical_constants.py Thu Mar 8 06:40:11 2007 @@ -1,0 +1,34 @@ +############################################################################### +# # +# Copyright (C) 2007 Edward d'Auvergne # +# # +# This file is part of the program relax. # +# # +# relax is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# relax is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with relax; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +############################################################################### + +# Python module imports. +from math import pi + + +# Planck's constant. +h = 6.62606876e-34 + +# Dirac's constant. +h_bar = h / (2.0*pi) + +# The magnetic constant or the permeability of vacuum. +mu0 = 4.0 * pi * 1e-7