signature:
def Pc ( CASRN , AvailableMethods = False , Method = None , IgnoreMethods = [ SURF ] ) :
    r'''This function handles the retrieval of a chemical ' s critical
 pressure . Lookup is based on CASRNs . Will automatically select a data
 source to use if no Method is provided ; returns None if the data is not
 available .
 Prefered sources are ' IUPAC ' for organic chemicals , and ' MATTHEWS ' for
 inorganic chemicals . Function has data for approximately 1000 chemicals .
 Examples
 > > > Pc ( CASRN = ' 64-17-5 ' )
 6137000.0
 Parameters
 CASRN : string
 CASRN [ - ]
 Returns
 Pc : float
 Critical pressure , [ Pa ]
 methods : list , only returned if AvailableMethods = = True
 List of methods which can be used to obtain Pc with the given inputs
 Other Parameters
 Method : string , optional
 The method name to use . Accepted methods are ' IUPAC ' , ' MATTHEWS ' ,
 ' CRC ' , ' PSRK ' , ' PD ' , ' YAWS ' , and ' SURF ' . All valid values are also held
 in the list ` Pc _ methods ` .
 AvailableMethods : bool , optional
 If True , function will determine which methods can be used to obtain
 Pc for the desired chemical , and will return methods instead of Pc
 IgnoreMethods : list , optional
 A list of methods to ignore in obtaining the full list of methods ,
 useful for for performance reasons and ignoring inaccurate methods
 Notes
 A total of seven sources are available for this function . They are :
 * ' IUPAC ' , a series of critically evaluated
 experimental datum for organic compounds in [ 1 ] _ , [ 2 ] _ , [ 3 ] _ , [ 4 ] _ ,
 [5 ] _ , [ 6 ] _ , [ 7 ] _ , [ 8 ] _ , [ 9 ] _ , [ 10 ] _ , [ 11 ] _ , and [ 12 ] _ .
 * ' MATTHEWS ' , a series of critically
 evaluated data for inorganic compounds in [ 13 ] _ .
 * ' CRC ' , a compillation of critically
 evaluated data by the TRC as published in [ 14 ] _ .
 * ' PSRK ' , a compillation of experimental and
 estimated data published in [ 15 ] _ .
 * ' PD ' , an older compillation of
 data published in [ 16 ] _
 * ' YAWS ' , a large compillation of data from a
 variety of sources ; no data points are sourced in the work of [ 17 ] _ .
 * SURF ' , an estimation method using a
 simple quadratic method for estimating Pc from Tc and Vc . This is
 ignored and not returned as a method by default .
 References
 . . [ 1 ] Ambrose , Douglas , and Colin L . Young . " Vapor - Liquid Critical
 Properties of Elements and Compounds . 1 . An Introductory Survey . "
 Journal of Chemical & Engineering Data 41 , no . 1 ( January 1 , 1996 ) :
 154-154 . doi : 10.1021 / je950378q .
 . . [ 2 ] Ambrose , Douglas , and Constantine Tsonopoulos . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 2 . Normal Alkanes . "
 Journal of Chemical & Engineering Data 40 , no . 3 ( May 1 , 1995 ) : 531-46.
 doi : 10.1021 / je00019a001.
 . . [ 3 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 3 . Aromatic
 Hydrocarbons . " Journal of Chemical & Engineering Data 40 , no . 3
 ( May 1 , 1995 ) : 547-58 . doi : 10.1021 / je00019a002.
 . . [ 4 ] Gude , Michael , and Amyn S . Teja . " Vapor - Liquid Critical Properties
 of Elements and Compounds . 4 . Aliphatic Alkanols . " Journal of Chemical
 & Engineering Data 40 , no . 5 ( September 1 , 1995 ) : 1025-36.
 doi : 10.1021 / je00021a001.
 . . [ 5 ] Daubert , Thomas E . " Vapor - Liquid Critical Properties of Elements
 and Compounds . 5 . Branched Alkanes and Cycloalkanes . " Journal of
 Chemical & Engineering Data 41 , no . 3 ( January 1 , 1996 ) : 365-72.
 doi : 10.1021 / je9501548.
 . . [ 6 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 6 . Unsaturated Aliphatic
 Hydrocarbons . " Journal of Chemical & Engineering Data 41 , no . 4
 ( January 1 , 1996 ) : 645-56 . doi : 10.1021 / je9501999.
 . . [ 7 ] Kudchadker , Arvind P . , Douglas Ambrose , and Constantine Tsonopoulos .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 7 . Oxygen
 Compounds Other Than Alkanols and Cycloalkanols . " Journal of Chemical &
 Engineering Data 46 , no . 3 ( May 1 , 2001 ) : 457-79 . doi : 10.1021 / je0001680.
 . . [ 8 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 8 . Organic Sulfur ,
 Silicon , and Tin Compounds ( C + H + S , Si , and Sn ) . " Journal of Chemical
 & Engineering Data 46 , no . 3 ( May 1 , 2001 ) : 480-85.
 doi : 10.1021 / je000210r .
 . . [ 9 ] Marsh , Kenneth N . , Colin L . Young , David W . Morton , Douglas Ambrose ,
 and Constantine Tsonopoulos . " Vapor - Liquid Critical Properties of
 Elements and Compounds . 9 . Organic Compounds Containing Nitrogen . "
 Journal of Chemical & Engineering Data 51 , no . 2 ( March 1 , 2006 ) :
 305-14 . doi : 10.1021 / je050221q .
 . . [ 10 ] Marsh , Kenneth N . , Alan Abramson , Douglas Ambrose , David W . Morton ,
 Eugene Nikitin , Constantine Tsonopoulos , and Colin L . Young .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 10 . Organic
 Compounds Containing Halogens . " Journal of Chemical & Engineering Data
 52 , no . 5 ( September 1 , 2007 ) : 1509-38 . doi : 10.1021 / je700336g .
 . . [ 11 ] Ambrose , Douglas , Constantine Tsonopoulos , and Eugene D . Nikitin .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 11 . Organic
 Compounds Containing B + O ; Halogens + N , + O , + O + S , + S , + Si ;
 N + O ; and O + S , + Si . " Journal of Chemical & Engineering Data 54,
 no . 3 ( March 12 , 2009 ) : 669-89 . doi : 10.1021 / je800580z .
 . . [ 12 ] Ambrose , Douglas , Constantine Tsonopoulos , Eugene D . Nikitin , David
 W . Morton , and Kenneth N . Marsh . " Vapor - Liquid Critical Properties of
 Elements and Compounds . 12 . Review of Recent Data for Hydrocarbons and
 Non - Hydrocarbons . " Journal of Chemical & Engineering Data , October 5,
 2015 , 151005081500002 . doi : 10.1021 / acs . jced . 5b00571.
 . . [ 13 ] Mathews , Joseph F . " Critical Constants of Inorganic Substances . "
 Chemical Reviews 72 , no . 1 ( February 1 , 1972 ) : 71-100.
 doi : 10.1021 / cr60275a004.
 . . [ 14 ] Haynes , W . M . , Thomas J . Bruno , and David R . Lide . CRC Handbook of
 Chemistry and Physics , 95E . Boca Raton , FL : CRC press , 2014.
 . . [ 15 ] Horstmann , Sven , Anna Jabłoniec , Jörg Krafczyk , Kai Fischer , and
 Jürgen Gmehling . " PSRK Group Contribution Equation of State :
 Comprehensive Revision and Extension IV , Including Critical Constants
 and Α - Function Parameters for 1000 Components . " Fluid Phase Equilibria
 227 , no . 2 ( January 25 , 2005 ) : 157-64 . doi : 10.1016 / j . fluid . 2004.11.002.
 . . [ 16 ] Passut , Charles A . , and Ronald P . Danner . " Acentric Factor . A
 Valuable Correlating Parameter for the Properties of Hydrocarbons . "
 Industrial & Engineering Chemistry Process Design and Development 12,
 no . 3 ( July 1 , 1973 ) : 365–68 . doi : 10.1021 / i260047a026.
 . . [ 17 ] Yaws , Carl L . Thermophysical Properties of Chemicals and
 Hydrocarbons , Second Edition . Amsterdam Boston : Gulf Professional
 Publishing , 2014.'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if CASRN in _crit_IUPAC . index and not np . isnan ( _crit_IUPAC . at [ CASRN , 'Pc' ] ) :
        methods . append ( IUPAC )
    if CASRN in _crit_Matthews . index and not np . isnan ( _crit_Matthews . at [ CASRN , 'Pc' ] ) :
        methods . append ( MATTHEWS )
    if CASRN in _crit_CRC . index and not np . isnan ( _crit_CRC . at [ CASRN , 'Pc' ] ) :
        methods . append ( CRC )
    if CASRN in _crit_PSRKR4 . index and not np . isnan ( _crit_PSRKR4 . at [ CASRN , 'Pc' ] ) :
        methods . append ( PSRK )
    if CASRN in _crit_PassutDanner . index and not np . isnan ( _crit_PassutDanner . at [ CASRN , 'Pc' ] ) :
        methods . append ( PD )
    if CASRN in _crit_Yaws . index and not np . isnan ( _crit_Yaws . at [ CASRN , 'Pc' ] ) :
        methods . append ( YAWS )
    if CASRN :
        methods . append ( SURF )
    if IgnoreMethods :
        for Method in IgnoreMethods :
            if Method in methods :
                methods . remove ( Method )
    methods . append ( NONE )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
if Method == IUPAC :
    _Pc = float ( _crit_IUPAC . at [ CASRN , 'Pc' ] )
elif Method == MATTHEWS :
    _Pc = float ( _crit_Matthews . at [ CASRN , 'Pc' ] )
elif Method == CRC :
    _Pc = float ( _crit_CRC . at [ CASRN , 'Pc' ] )
elif Method == PSRK :
    _Pc = float ( _crit_PSRKR4 . at [ CASRN , 'Pc' ] )
elif Method == PD :
    _Pc = float ( _crit_PassutDanner . at [ CASRN , 'Pc' ] )
elif Method == YAWS :
    _Pc = float ( _crit_Yaws . at [ CASRN , 'Pc' ] )
elif Method == SURF :
    _Pc = third_property ( CASRN = CASRN , P = True )
elif Method == NONE :
    return None
else :
    raise Exception ( 'Failure in in function' )
return _Pc


signature:
def Vc ( CASRN , AvailableMethods = False , Method = None , IgnoreMethods = [ SURF ] ) :
    r'''This function handles the retrieval of a chemical ' s critical
 volume . Lookup is based on CASRNs . Will automatically select a data
 source to use if no Method is provided ; returns None if the data is not
 available .
 Prefered sources are ' IUPAC ' for organic chemicals , and ' MATTHEWS ' for
 inorganic chemicals . Function has data for approximately 1000 chemicals .
 Examples
 > > > Vc ( CASRN = ' 64-17-5 ' )
 0.000168
 Parameters
 CASRN : string
 CASRN [ - ]
 Returns
 Vc : float
 Critical volume , [ m ^ 3 / mol ]
 methods : list , only returned if AvailableMethods = = True
 List of methods which can be used to obtain Vc with the given inputs
 Other Parameters
 Method : string , optional
 The method name to use . Accepted methods are ' IUPAC ' , ' MATTHEWS ' ,
 ' CRC ' , ' PSRK ' , ' YAWS ' , and ' SURF ' . All valid values are also held
 in the list ` Vc _ methods ` .
 AvailableMethods : bool , optional
 If True , function will determine which methods can be used to obtain
 Vc for the desired chemical , and will return methods instead of Vc
 IgnoreMethods : list , optional
 A list of methods to ignore in obtaining the full list of methods ,
 useful for for performance reasons and ignoring inaccurate methods
 Notes
 A total of six sources are available for this function . They are :
 * ' IUPAC ' , a series of critically evaluated
 experimental datum for organic compounds in [ 1 ] _ , [ 2 ] _ , [ 3 ] _ , [ 4 ] _ ,
 [5 ] _ , [ 6 ] _ , [ 7 ] _ , [ 8 ] _ , [ 9 ] _ , [ 10 ] _ , [ 11 ] _ , and [ 12 ] _ .
 * ' MATTHEWS ' , a series of critically
 evaluated data for inorganic compounds in [ 13 ] _ .
 * ' CRC ' , a compillation of critically
 evaluated data by the TRC as published in [ 14 ] _ .
 * ' PSRK ' , a compillation of experimental and
 estimated data published in [ 15 ] _ .
 * ' YAWS ' , a large compillation of data from a
 variety of sources ; no data points are sourced in the work of [ 16 ] _ .
 * ' SURF ' , an estimation method using a
 simple quadratic method for estimating Pc from Tc and Vc . This is
 ignored and not returned as a method by default
 References
 . . [ 1 ] Ambrose , Douglas , and Colin L . Young . " Vapor - Liquid Critical
 Properties of Elements and Compounds . 1 . An Introductory Survey . "
 Journal of Chemical & Engineering Data 41 , no . 1 ( January 1 , 1996 ) :
 154-154 . doi : 10.1021 / je950378q .
 . . [ 2 ] Ambrose , Douglas , and Constantine Tsonopoulos . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 2 . Normal Alkanes . "
 Journal of Chemical & Engineering Data 40 , no . 3 ( May 1 , 1995 ) : 531-46.
 doi : 10.1021 / je00019a001.
 . . [ 3 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 3 . Aromatic
 Hydrocarbons . " Journal of Chemical & Engineering Data 40 , no . 3
 ( May 1 , 1995 ) : 547-58 . doi : 10.1021 / je00019a002.
 . . [ 4 ] Gude , Michael , and Amyn S . Teja . " Vapor - Liquid Critical Properties
 of Elements and Compounds . 4 . Aliphatic Alkanols . " Journal of Chemical
 & Engineering Data 40 , no . 5 ( September 1 , 1995 ) : 1025-36.
 doi : 10.1021 / je00021a001.
 . . [ 5 ] Daubert , Thomas E . " Vapor - Liquid Critical Properties of Elements
 and Compounds . 5 . Branched Alkanes and Cycloalkanes . " Journal of
 Chemical & Engineering Data 41 , no . 3 ( January 1 , 1996 ) : 365-72.
 doi : 10.1021 / je9501548.
 . . [ 6 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 6 . Unsaturated Aliphatic
 Hydrocarbons . " Journal of Chemical & Engineering Data 41 , no . 4
 ( January 1 , 1996 ) : 645-56 . doi : 10.1021 / je9501999.
 . . [ 7 ] Kudchadker , Arvind P . , Douglas Ambrose , and Constantine Tsonopoulos .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 7 . Oxygen
 Compounds Other Than Alkanols and Cycloalkanols . " Journal of Chemical &
 Engineering Data 46 , no . 3 ( May 1 , 2001 ) : 457-79 . doi : 10.1021 / je0001680.
 . . [ 8 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 8 . Organic Sulfur ,
 Silicon , and Tin Compounds ( C + H + S , Si , and Sn ) . " Journal of Chemical
 & Engineering Data 46 , no . 3 ( May 1 , 2001 ) : 480-85.
 doi : 10.1021 / je000210r .
 . . [ 9 ] Marsh , Kenneth N . , Colin L . Young , David W . Morton , Douglas Ambrose ,
 and Constantine Tsonopoulos . " Vapor - Liquid Critical Properties of
 Elements and Compounds . 9 . Organic Compounds Containing Nitrogen . "
 Journal of Chemical & Engineering Data 51 , no . 2 ( March 1 , 2006 ) :
 305-14 . doi : 10.1021 / je050221q .
 . . [ 10 ] Marsh , Kenneth N . , Alan Abramson , Douglas Ambrose , David W . Morton ,
 Eugene Nikitin , Constantine Tsonopoulos , and Colin L . Young .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 10 . Organic
 Compounds Containing Halogens . " Journal of Chemical & Engineering Data
 52 , no . 5 ( September 1 , 2007 ) : 1509-38 . doi : 10.1021 / je700336g .
 . . [ 11 ] Ambrose , Douglas , Constantine Tsonopoulos , and Eugene D . Nikitin .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 11 . Organic
 Compounds Containing B + O ; Halogens + N , + O , + O + S , + S , + Si ;
 N + O ; and O + S , + Si . " Journal of Chemical & Engineering Data 54,
 no . 3 ( March 12 , 2009 ) : 669-89 . doi : 10.1021 / je800580z .
 . . [ 12 ] Ambrose , Douglas , Constantine Tsonopoulos , Eugene D . Nikitin , David
 W . Morton , and Kenneth N . Marsh . " Vapor - Liquid Critical Properties of
 Elements and Compounds . 12 . Review of Recent Data for Hydrocarbons and
 Non - Hydrocarbons . " Journal of Chemical & Engineering Data , October 5,
 2015 , 151005081500002 . doi : 10.1021 / acs . jced . 5b00571.
 . . [ 13 ] Mathews , Joseph F . " Critical Constants of Inorganic Substances . "
 Chemical Reviews 72 , no . 1 ( February 1 , 1972 ) : 71-100.
 doi : 10.1021 / cr60275a004.
 . . [ 14 ] Haynes , W . M . , Thomas J . Bruno , and David R . Lide . CRC Handbook of
 Chemistry and Physics , 95E . Boca Raton , FL : CRC press , 2014.
 . . [ 15 ] Horstmann , Sven , Anna Jabłoniec , Jörg Krafczyk , Kai Fischer , and
 Jürgen Gmehling . " PSRK Group Contribution Equation of State :
 Comprehensive Revision and Extension IV , Including Critical Constants
 and Α - Function Parameters for 1000 Components . " Fluid Phase Equilibria
 227 , no . 2 ( January 25 , 2005 ) : 157-64 . doi : 10.1016 / j . fluid . 2004.11.002.
 . . [ 16 ] Yaws , Carl L . Thermophysical Properties of Chemicals and
 Hydrocarbons , Second Edition . Amsterdam Boston : Gulf Professional
 Publishing , 2014.'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if CASRN in _crit_IUPAC . index and not np . isnan ( _crit_IUPAC . at [ CASRN , 'Vc' ] ) :
        methods . append ( IUPAC )
    if CASRN in _crit_Matthews . index and not np . isnan ( _crit_Matthews . at [ CASRN , 'Vc' ] ) :
        methods . append ( MATTHEWS )
    if CASRN in _crit_CRC . index and not np . isnan ( _crit_CRC . at [ CASRN , 'Vc' ] ) :
        methods . append ( CRC )
    if CASRN in _crit_PSRKR4 . index and not np . isnan ( _crit_PSRKR4 . at [ CASRN , 'Vc' ] ) :
        methods . append ( PSRK )
    if CASRN in _crit_Yaws . index and not np . isnan ( _crit_Yaws . at [ CASRN , 'Vc' ] ) :
        methods . append ( YAWS )
    if CASRN :
        methods . append ( SURF )
    if IgnoreMethods :
        for Method in IgnoreMethods :
            if Method in methods :
                methods . remove ( Method )
    methods . append ( NONE )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
if Method == IUPAC :
    _Vc = float ( _crit_IUPAC . at [ CASRN , 'Vc' ] )
elif Method == PSRK :
    _Vc = float ( _crit_PSRKR4 . at [ CASRN , 'Vc' ] )
elif Method == MATTHEWS :
    _Vc = float ( _crit_Matthews . at [ CASRN , 'Vc' ] )
elif Method == CRC :
    _Vc = float ( _crit_CRC . at [ CASRN , 'Vc' ] )
elif Method == YAWS :
    _Vc = float ( _crit_Yaws . at [ CASRN , 'Vc' ] )
elif Method == SURF :
    _Vc = third_property ( CASRN = CASRN , V = True )
elif Method == NONE :
    return None
else :
    raise Exception ( 'Failure in in function' )
return _Vc


signature:
def Zc ( CASRN , AvailableMethods = False , Method = None , IgnoreMethods = [ COMBINED ] ) :
    r'''This function handles the retrieval of a chemical ' s critical
 compressibility . Lookup is based on CASRNs . Will automatically select a
 data source to use if no Method is provided ; returns None if the data is
 not available .
 Prefered sources are ' IUPAC ' for organic chemicals , and ' MATTHEWS ' for
 inorganic chemicals . Function has data for approximately 1000 chemicals .
 Examples
 > > > Zc ( CASRN = ' 64-17-5 ' )
 0.241000002
 Parameters
 CASRN : string
 CASRN [ - ]
 Returns
 Zc : float
 Critical compressibility , [ - ]
 methods : list , only returned if AvailableMethods = = True
 List of methods which can be used to obtain Vc with the given inputs
 Other Parameters
 Method : string , optional
 The method name to use . Accepted methods are ' IUPAC ' , ' MATTHEWS ' ,
 ' CRC ' , ' PSRK ' , ' YAWS ' , and ' COMBINED ' . All valid values are also held
 in ` Zc _ methods ` .
 AvailableMethods : bool , optional
 If True , function will determine which methods can be used to obtain
 Zc for the desired chemical , and will return methods instead of Zc
 IgnoreMethods : list , optional
 A list of methods to ignore in obtaining the full list of methods ,
 useful for for performance reasons and ignoring inaccurate methods
 Notes
 A total of five sources are available for this function . They are :
 * ' IUPAC ' , a series of critically evaluated
 experimental datum for organic compounds in [ 1 ] _ , [ 2 ] _ , [ 3 ] _ , [ 4 ] _ ,
 [5 ] _ , [ 6 ] _ , [ 7 ] _ , [ 8 ] _ , [ 9 ] _ , [ 10 ] _ , [ 11 ] _ , and [ 12 ] _ .
 * ' MATTHEWS ' , a series of critically
 evaluated data for inorganic compounds in [ 13 ] _ .
 * ' CRC ' , a compillation of critically
 evaluated data by the TRC as published in [ 14 ] _ .
 * ' PSRK ' , a compillation of experimental and
 estimated data published in [ 15 ] _ .
 * ' YAWS ' , a large compillation of data from a
 variety of sources ; no data points are sourced in the work of [ 16 ] _ .
 References
 . . [ 1 ] Ambrose , Douglas , and Colin L . Young . " Vapor - Liquid Critical
 Properties of Elements and Compounds . 1 . An Introductory Survey . "
 Journal of Chemical & Engineering Data 41 , no . 1 ( January 1 , 1996 ) :
 154-154 . doi : 10.1021 / je950378q .
 . . [ 2 ] Ambrose , Douglas , and Constantine Tsonopoulos . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 2 . Normal Alkanes . "
 Journal of Chemical & Engineering Data 40 , no . 3 ( May 1 , 1995 ) : 531-46.
 doi : 10.1021 / je00019a001.
 . . [ 3 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 3 . Aromatic
 Hydrocarbons . " Journal of Chemical & Engineering Data 40 , no . 3
 ( May 1 , 1995 ) : 547-58 . doi : 10.1021 / je00019a002.
 . . [ 4 ] Gude , Michael , and Amyn S . Teja . " Vapor - Liquid Critical Properties
 of Elements and Compounds . 4 . Aliphatic Alkanols . " Journal of Chemical
 & Engineering Data 40 , no . 5 ( September 1 , 1995 ) : 1025-36.
 doi : 10.1021 / je00021a001.
 . . [ 5 ] Daubert , Thomas E . " Vapor - Liquid Critical Properties of Elements
 and Compounds . 5 . Branched Alkanes and Cycloalkanes . " Journal of
 Chemical & Engineering Data 41 , no . 3 ( January 1 , 1996 ) : 365-72.
 doi : 10.1021 / je9501548.
 . . [ 6 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 6 . Unsaturated Aliphatic
 Hydrocarbons . " Journal of Chemical & Engineering Data 41 , no . 4
 ( January 1 , 1996 ) : 645-56 . doi : 10.1021 / je9501999.
 . . [ 7 ] Kudchadker , Arvind P . , Douglas Ambrose , and Constantine Tsonopoulos .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 7 . Oxygen
 Compounds Other Than Alkanols and Cycloalkanols . " Journal of Chemical &
 Engineering Data 46 , no . 3 ( May 1 , 2001 ) : 457-79 . doi : 10.1021 / je0001680.
 . . [ 8 ] Tsonopoulos , Constantine , and Douglas Ambrose . " Vapor - Liquid
 Critical Properties of Elements and Compounds . 8 . Organic Sulfur ,
 Silicon , and Tin Compounds ( C + H + S , Si , and Sn ) . " Journal of Chemical
 & Engineering Data 46 , no . 3 ( May 1 , 2001 ) : 480-85.
 doi : 10.1021 / je000210r .
 . . [ 9 ] Marsh , Kenneth N . , Colin L . Young , David W . Morton , Douglas Ambrose ,
 and Constantine Tsonopoulos . " Vapor - Liquid Critical Properties of
 Elements and Compounds . 9 . Organic Compounds Containing Nitrogen . "
 Journal of Chemical & Engineering Data 51 , no . 2 ( March 1 , 2006 ) :
 305-14 . doi : 10.1021 / je050221q .
 . . [ 10 ] Marsh , Kenneth N . , Alan Abramson , Douglas Ambrose , David W . Morton ,
 Eugene Nikitin , Constantine Tsonopoulos , and Colin L . Young .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 10 . Organic
 Compounds Containing Halogens . " Journal of Chemical & Engineering Data
 52 , no . 5 ( September 1 , 2007 ) : 1509-38 . doi : 10.1021 / je700336g .
 . . [ 11 ] Ambrose , Douglas , Constantine Tsonopoulos , and Eugene D . Nikitin .
 " Vapor - Liquid Critical Properties of Elements and Compounds . 11 . Organic
 Compounds Containing B + O ; Halogens + N , + O , + O + S , + S , + Si ;
 N + O ; and O + S , + Si . " Journal of Chemical & Engineering Data 54,
 no . 3 ( March 12 , 2009 ) : 669-89 . doi : 10.1021 / je800580z .
 . . [ 12 ] Ambrose , Douglas , Constantine Tsonopoulos , Eugene D . Nikitin , David
 W . Morton , and Kenneth N . Marsh . " Vapor - Liquid Critical Properties of
 Elements and Compounds . 12 . Review of Recent Data for Hydrocarbons and
 Non - Hydrocarbons . " Journal of Chemical & Engineering Data , October 5,
 2015 , 151005081500002 . doi : 10.1021 / acs . jced . 5b00571.
 . . [ 13 ] Mathews , Joseph F . " Critical Constants of Inorganic Substances . "
 Chemical Reviews 72 , no . 1 ( February 1 , 1972 ) : 71-100.
 doi : 10.1021 / cr60275a004.
 . . [ 14 ] Haynes , W . M . , Thomas J . Bruno , and David R . Lide . CRC Handbook of
 Chemistry and Physics , 95E . Boca Raton , FL : CRC press , 2014.
 . . [ 15 ] Horstmann , Sven , Anna Jabłoniec , Jörg Krafczyk , Kai Fischer , and
 Jürgen Gmehling . " PSRK Group Contribution Equation of State :
 Comprehensive Revision and Extension IV , Including Critical Constants
 and Α - Function Parameters for 1000 Components . " Fluid Phase Equilibria
 227 , no . 2 ( January 25 , 2005 ) : 157-64 . doi : 10.1016 / j . fluid . 2004.11.002.
 . . [ 16 ] Yaws , Carl L . Thermophysical Properties of Chemicals and
 Hydrocarbons , Second Edition . Amsterdam Boston : Gulf Professional
 Publishing , 2014.'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if CASRN in _crit_IUPAC . index and not np . isnan ( _crit_IUPAC . at [ CASRN , 'Zc' ] ) :
        methods . append ( IUPAC )
    if CASRN in _crit_Matthews . index and not np . isnan ( _crit_Matthews . at [ CASRN , 'Zc' ] ) :
        methods . append ( MATTHEWS )
    if CASRN in _crit_CRC . index and not np . isnan ( _crit_CRC . at [ CASRN , 'Zc' ] ) :
        methods . append ( CRC )
    if CASRN in _crit_PSRKR4 . index and not np . isnan ( _crit_PSRKR4 . at [ CASRN , 'Zc' ] ) :
        methods . append ( PSRK )
    if CASRN in _crit_Yaws . index and not np . isnan ( _crit_Yaws . at [ CASRN , 'Zc' ] ) :
        methods . append ( YAWS )
    if Tc ( CASRN ) and Vc ( CASRN ) and Pc ( CASRN ) :
        methods . append ( COMBINED )
    if IgnoreMethods :
        for Method in IgnoreMethods :
            if Method in methods :
                methods . remove ( Method )
    methods . append ( NONE )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
# This is the calculate , given the method section
if Method == IUPAC :
    _Zc = float ( _crit_IUPAC . at [ CASRN , 'Zc' ] )
elif Method == PSRK :
    _Zc = float ( _crit_PSRKR4 . at [ CASRN , 'Zc' ] )
elif Method == MATTHEWS :
    _Zc = float ( _crit_Matthews . at [ CASRN , 'Zc' ] )
elif Method == CRC :
    _Zc = float ( _crit_CRC . at [ CASRN , 'Zc' ] )
elif Method == YAWS :
    _Zc = float ( _crit_Yaws . at [ CASRN , 'Zc' ] )
elif Method == COMBINED :
    _Zc = Vc ( CASRN ) * Pc ( CASRN ) / Tc ( CASRN ) / R
elif Method == NONE :
    return None
else :
    raise Exception ( 'Failure in in function' )
return _Zc


signature:
def Mersmann_Kind_predictor ( atoms , coeff = 3.645 , power = 0.5 , covalent_radii = rcovs_Mersmann_Kind ) :
    r'''Predicts the critical molar volume of a chemical based only on its
 atomic composition according to [ 1 ] _ and [ 2 ] _ . This is a crude approach ,
 but provides very reasonable
 estimates in practice . Optionally , the ` coeff ` used and the ` power ` in the
 fraction as well as the atomic contributions can be adjusted ; this method
 is general and atomic contributions can be regressed to predict other
 properties with this routine .
 . . math : :
 \ frac { \ left ( \ frac { V _ c } { n _ a N _ A } \ right ) ^ { 1/3 } } { d _ a }
 = \ frac { 3.645 } { \ left ( \ frac { r _ a } { r _ H } \ right ) ^ { 1/2 } }
 r _ a = d _ a / 2
 d _ a = 2 \ frac { \ sum _ i ( n _ i r _ i ) } { n _ a }
 In the above equations , : math : ` n _ i ` is the number of atoms of species i in
 the molecule , : math : ` r _ i ` is the covalent atomic radius of the atom , and
 : math : ` n _ a ` is the total number of atoms in the molecule .
 Parameters
 atoms : dict
 Dictionary of atoms and their counts , [ - ]
 coeff : float , optional
 Coefficient used in the relationship , [ m ^ 2]
 power : float , optional
 Power applied to the relative atomic radius , [ - ]
 covalent _ radii : dict or indexable , optional
 Object which can be indexed to atomic contrinbutions ( by symbol ) , [ - ]
 Returns
 Vc : float
 Predicted critical volume of the chemical , [ m ^ 3 / mol ]
 Notes
 Using the : obj : ` thermo . elements . periodic _ table ` covalent radii ( from RDKit ) ,
 the coefficient and power should be 4.261206523632586 and 0.5597281770786228
 respectively for best results .
 Examples
 Prediction of critical volume of decane :
 > > > Mersmann _ Kind _ predictor ( { ' C ' : 10 , ' H ' : 22 } )
 0.0005851859052024729
 This is compared against the experimental value , 0.000624 ( a 6.2 % relative
 error )
 Using custom fitted coefficients we can do a bit better :
 > > > from thermo . critical import rcovs _ regressed
 > > > Mersmann _ Kind _ predictor ( { ' C ' : 10 , ' H ' : 22 } , coeff = 4.261206523632586,
 . . . power = 0.5597281770786228 , covalent _ radii = rcovs _ regressed )
 0.0005956871011923075
 The relative error is only 4.5 % now . This is compared to an experimental
 uncertainty of 5.6 % .
 Evaluating 1321 critical volumes in the database , the average relative
 error is 5.0 % ; standard deviation 6.8 % ; and worst value of 79 % relative
 error for phosphorus .
 References
 . . [ 1 ] Mersmann , Alfons , and Matthias Kind . " Correlation for the Prediction
 of Critical Molar Volume . " Industrial & Engineering Chemistry Research ,
 October 16 , 2017 . https : / / doi . org / 10.1021 / acs . iecr . 7b03171.
 . . [ 2 ] Mersmann , Alfons , and Matthias Kind . " Prediction of Mechanical and
 Thermal Properties of Pure Liquids , of Critical Data , and of Vapor
 Pressure . " Industrial & Engineering Chemistry Research , January 31,
 2017 . https : / / doi . org / 10.1021 / acs . iecr . 6b04323.'''

implementation:
H_RADIUS_COV = covalent_radii [ 'H' ]
tot = 0
atom_count = 0
for atom , count in atoms . items ( ) :
    if atom not in covalent_radii :
        raise Exception ( 'Atom %s is not supported by the supplied dictionary' % atom )
    tot += count * covalent_radii [ atom ]
    atom_count += count
da = 2. * tot / atom_count
ra = da / 2.
da_SI = da * 1e-10
# Convert from angstrom to m
return ( ( coeff / ( ra / H_RADIUS_COV ) ** power ) * da_SI ) ** 3 * N_A * atom_count


signature:
def Ihmels ( Tc = None , Pc = None , Vc = None ) :
    r'''Most recent , and most recommended method of estimating critical
 properties from each other . Two of the three properties are required .
 This model uses the " critical surface " , a general plot of Tc vs Pc vs Vc .
 The model used 421 organic compounds to derive equation .
 The general equation is in [ 1 ] _ :
 . . math : :
 P _ c = - 0.025 + 2.215 \ frac { T _ c } { V _ c }
 Parameters
 Tc : float
 Critical temperature of fluid ( optional ) [ K ]
 Pc : float
 Critical pressure of fluid ( optional ) [ Pa ]
 Vc : float
 Critical volume of fluid ( optional ) [ m ^ 3 / mol ]
 Returns
 Tc , Pc or Vc : float
 Critical property of fluid [ K ] , [ Pa ] , or [ m ^ 3 / mol ]
 Notes
 The prediction of Tc from Pc and Vc is not tested , as this is not necessary
 anywhere , but it is implemented .
 Internal units are MPa , cm ^ 3 / mol , and K . A slight error occurs when
 Pa , cm ^ 3 / mol and K are used instead , on the order of < 0.2 % .
 Their equation was also compared with 56 inorganic and elements .
 Devations of 20 % for < 200K or > 1000K points .
 Examples
 Succinic acid [ 110-15-6]
 > > > Ihmels ( Tc = 851.0 , Vc = 0.000308)
 6095016.233766234
 References
 . . [ 1 ] Ihmels , E . Christian . " The Critical Surface . " Journal of Chemical
 & Engineering Data 55 , no . 9 ( September 9 , 2010 ) : 3474-80.
 doi : 10.1021 / je100167w .'''

implementation:
if Tc and Vc :
    Vc = Vc * 1E6
    # m ^ 3 / mol to cm ^ 3 / mol
    Pc = - 0.025 + 2.215 * Tc / Vc
    Pc = Pc * 1E6
    # MPa to Pa
    return Pc
elif Tc and Pc :
    Pc = Pc / 1E6
    # Pa to MPa
    Vc = 443 * Tc / ( 200 * Pc + 5 )
    Vc = Vc / 1E6
    # cm ^ 3 / mol to m ^ 3 / mol
    return Vc
elif Pc and Vc :
    Pc = Pc / 1E6
    # Pa to MPa
    Vc = Vc * 1E6
    # m ^ 3 / mol to cm ^ 3 / mol
    Tc = 5.0 / 443 * ( 40 * Pc * Vc + Vc )
    return Tc
else :
    raise Exception ( 'Two of Tc, Pc, and Vc must be provided' )


signature:
def Meissner ( Tc = None , Pc = None , Vc = None ) :
    r'''Old ( 1942 ) relationship for estimating critical
 properties from each other . Two of the three properties are required .
 This model uses the " critical surface " , a general plot of Tc vs Pc vs Vc .
 The model used 42 organic and inorganic compounds to derive the equation .
 The general equation is in [ 1 ] _ :
 . . math : :
 P _ c = \ frac { 2.08 T _ c } { V _ c - 8}
 Parameters
 Tc : float , optional
 Critical temperature of fluid [ K ]
 Pc : float , optional
 Critical pressure of fluid [ Pa ]
 Vc : float , optional
 Critical volume of fluid [ m ^ 3 / mol ]
 Returns
 Tc , Pc or Vc : float
 Critical property of fluid [ K ] , [ Pa ] , or [ m ^ 3 / mol ]
 Notes
 The prediction of Tc from Pc and Vc is not tested , as this is not necessary
 anywhere , but it is implemented .
 Internal units are atm , cm ^ 3 / mol , and K . A slight error occurs when
 Pa , cm ^ 3 / mol and K are used instead , on the order of < 0.2 % .
 This equation is less accurate than that of Ihmels , but surprisingly close .
 The author also proposed means of estimated properties independently .
 Examples
 Succinic acid [ 110-15-6]
 > > > Meissner ( Tc = 851.0 , Vc = 0.000308)
 5978445.199999
 References
 . . [ 1 ] Meissner , H . P . , and E . M . Redding . " Prediction of Critical
 Constants . " Industrial & Engineering Chemistry 34 , no . 5
 ( May 1 , 1942 ) : 521-26 . doi : 10.1021 / ie50389a003.'''

implementation:
if Tc and Vc :
    Vc = Vc * 1E6
    Pc = 20.8 * Tc / ( Vc - 8 )
    Pc = 101325 * Pc
    # atm to Pa
    return Pc
elif Tc and Pc :
    Pc = Pc / 101325.
    # Pa to atm
    Vc = 104 / 5.0 * Tc / Pc + 8
    Vc = Vc / 1E6
    # cm ^ 3 / mol to m ^ 3 / mol
    return Vc
elif Pc and Vc :
    Pc = Pc / 101325.
    # Pa to atm
    Vc = Vc * 1E6
    # m ^ 3 / mol to cm ^ 3 / mol
    Tc = 5. / 104.0 * Pc * ( Vc - 8 )
    return Tc
else :
    raise Exception ( 'Two of Tc, Pc, and Vc must be provided' )


signature:
def Grigoras ( Tc = None , Pc = None , Vc = None ) :
    r'''Relatively recent ( 1990 ) relationship for estimating critical
 properties from each other . Two of the three properties are required .
 This model uses the " critical surface " , a general plot of Tc vs Pc vs Vc .
 The model used 137 organic and inorganic compounds to derive the equation .
 The general equation is in [ 1 ] _ :
 . . math : :
 P _ c = 2.9 + 20.2 \ frac { T _ c } { V _ c }
 Parameters
 Tc : float
 Critical temperature of fluid ( optional ) [ K ]
 Pc : float
 Critical pressure of fluid ( optional ) [ Pa ]
 Vc : float
 Critical volume of fluid ( optional ) [ m ^ 3 / mol ]
 Returns
 Tc , Pc or Vc : float
 Critical property of fluid [ K ] , [ Pa ] , or [ m ^ 3 / mol ]
 Notes
 The prediction of Tc from Pc and Vc is not tested , as this is not necessary
 anywhere , but it is implemented .
 Internal units are bar , cm ^ 3 / mol , and K . A slight error occurs when
 Pa , cm ^ 3 / mol and K are used instead , on the order of < 0.2 % .
 This equation is less accurate than that of Ihmels , but surprisingly close .
 The author also investigated an early QSPR model .
 Examples
 Succinic acid [ 110-15-6]
 > > > Grigoras ( Tc = 851.0 , Vc = 0.000308)
 5871233.766233766
 References
 . . [ 1 ] Grigoras , Stelian . " A Structural Approach to Calculate Physical
 Properties of Pure Organic Substances : The Critical Temperature ,
 Critical Volume and Related Properties . " Journal of Computational
 Chemistry 11 , no . 4 ( May 1 , 1990 ) : 493-510.
 doi : 10.1002 / jcc . 540110408'''

implementation:
if Tc and Vc :
    Vc = Vc * 1E6
    # m ^ 3 / mol to cm ^ 3 / mol
    Pc = 2.9 + 20.2 * Tc / Vc
    Pc = Pc * 1E5
    # bar to Pa
    return Pc
elif Tc and Pc :
    Pc = Pc / 1E5
    # Pa to bar
    Vc = 202.0 * Tc / ( 10 * Pc - 29.0 )
    Vc = Vc / 1E6
    # cm ^ 3 / mol to m ^ 3 / mol
    return Vc
elif Pc and Vc :
    Pc = Pc / 1E5
    # Pa to bar
    Vc = Vc * 1E6
    # m ^ 3 / mol to cm ^ 3 / mol
    Tc = 1.0 / 202 * ( 10 * Pc - 29.0 ) * Vc
    return Tc
else :
    raise Exception ( 'Two of Tc, Pc, and Vc must be provided' )


signature:
def critical_surface ( Tc = None , Pc = None , Vc = None , AvailableMethods = False , Method = None ) :
    r'''Function for calculating a critical property of a substance from its
 other two critical properties . Calls functions Ihmels , Meissner , and
 Grigoras , each of which use a general ' Critical surface ' type of equation .
 Limited accuracy is expected due to very limited theoretical backing .
 Parameters
 Tc : float
 Critical temperature of fluid ( optional ) [ K ]
 Pc : float
 Critical pressure of fluid ( optional ) [ Pa ]
 Vc : float
 Critical volume of fluid ( optional ) [ m ^ 3 / mol ]
 AvailableMethods : bool
 Request available methods for given parameters
 Method : string
 Request calculation uses the requested method
 Returns
 Tc , Pc or Vc : float
 Critical property of fluid [ K ] , [ Pa ] , or [ m ^ 3 / mol ]
 Notes
 Examples
 Decamethyltetrasiloxane [ 141-62-8]
 > > > critical _ surface ( Tc = 599.4 , Pc = 1.19E6 , Method = ' IHMELS ' )
 0.0010927333334'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if ( Tc and Pc ) or ( Tc and Vc ) or ( Pc and Vc ) :
        methods . append ( IHMELS )
        methods . append ( MEISSNER )
        methods . append ( GRIGORAS )
    methods . append ( NONE )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
# This is the calculate , given the method section
if Method == IHMELS :
    Third = Ihmels ( Tc = Tc , Pc = Pc , Vc = Vc )
elif Method == MEISSNER :
    Third = Meissner ( Tc = Tc , Pc = Pc , Vc = Vc )
elif Method == GRIGORAS :
    Third = Grigoras ( Tc = Tc , Pc = Pc , Vc = Vc )
elif Method == NONE :
    Third = None
else :
    raise Exception ( 'Failure in in function' )
return Third


signature:
def third_property ( CASRN = None , T = False , P = False , V = False ) :
    r'''Function for calculating a critical property of a substance from its
 other two critical properties , but retrieving the actual other critical
 values for convenient calculation .
 Calls functions Ihmels , Meissner , and
 Grigoras , each of which use a general ' Critical surface ' type of equation .
 Limited accuracy is expected due to very limited theoretical backing .
 Parameters
 CASRN : string
 The CAS number of the desired chemical
 T : bool
 Estimate critical temperature
 P : bool
 Estimate critical pressure
 V : bool
 Estimate critical volume
 Returns
 Tc , Pc or Vc : float
 Critical property of fluid [ K ] , [ Pa ] , or [ m ^ 3 / mol ]
 Notes
 Avoids recursion only by eliminating the None and critical surface options
 for calculating each critical property . So long as it never calls itself .
 Note that when used by Tc , Pc or Vc , this function results in said function
 calling the other functions ( to determine methods ) and ( with method specified )
 Examples
 > > > # Decamethyltetrasiloxane [ 141-62-8]
 > > > third _ property ( ' 141-62-8 ' , V = True )
 0.0010920041152263375
 > > > # Succinic acid 110-15-6
 > > > third _ property ( ' 110-15-6 ' , P = True )
 6095016.233766234'''

implementation:
Third = None
if V :
    Tc_methods = Tc ( CASRN , AvailableMethods = True ) [ 0 : - 2 ]
    Pc_methods = Pc ( CASRN , AvailableMethods = True ) [ 0 : - 2 ]
    if Tc_methods and Pc_methods :
        _Tc = Tc ( CASRN = CASRN , Method = Tc_methods [ 0 ] )
        _Pc = Pc ( CASRN = CASRN , Method = Pc_methods [ 0 ] )
        Third = critical_surface ( Tc = _Tc , Pc = _Pc , Vc = None )
elif P :
    Tc_methods = Tc ( CASRN , AvailableMethods = True ) [ 0 : - 2 ]
    Vc_methods = Vc ( CASRN , AvailableMethods = True ) [ 0 : - 2 ]
    if Tc_methods and Vc_methods :
        _Tc = Tc ( CASRN = CASRN , Method = Tc_methods [ 0 ] )
        _Vc = Vc ( CASRN = CASRN , Method = Vc_methods [ 0 ] )
        Third = critical_surface ( Tc = _Tc , Vc = _Vc , Pc = None )
elif T :
    Pc_methods = Pc ( CASRN , AvailableMethods = True ) [ 0 : - 2 ]
    Vc_methods = Vc ( CASRN , AvailableMethods = True ) [ 0 : - 2 ]
    if Pc_methods and Vc_methods :
        _Pc = Pc ( CASRN = CASRN , Method = Pc_methods [ 0 ] )
        _Vc = Vc ( CASRN = CASRN , Method = Vc_methods [ 0 ] )
        Third = critical_surface ( Pc = _Pc , Vc = _Vc , Tc = None )
else :
    raise Exception ( 'Error in function' )
if not Third :
    return None
return Third


signature:
def Li ( zs , Tcs , Vcs ) :
    r'''Calculates critical temperature of a mixture according to
 mixing rules in [ 1 ] _ . Better than simple mixing rules .
 . . math : :
 T _ { cm } = \ sum _ { i = 1 } ^ n \ Phi _ i T _ { ci } \ \
 \ Phi = \ frac { x _ i V _ { ci } } { \ sum _ { j = 1 } ^ n x _ j V _ { cj } }
 Parameters
 zs : array - like
 Mole fractions of all components
 Tcs : array - like
 Critical temperatures of all components , [ K ]
 Vcs : array - like
 Critical volumes of all components , [ m ^ 3 / mol ]
 Returns
 Tcm : float
 Critical temperatures of the mixture , [ K ]
 Notes
 Reviewed in many papers on critical mixture temperature .
 Second example is from Najafi ( 2015 ) , for ethylene , Benzene , ethylbenzene .
 This is similar to but not identical to the result from the article . The
 experimental point is 486.9 K .
 2rd example is from Najafi ( 2015 ) , for :
 butane / pentane / hexane 0.6449/0.2359/0.1192 mixture , exp : 450.22 K .
 Its result is identical to that calculated in the article .
 Examples
 Nitrogen - Argon 50/50 mixture
 > > > Li ( [ 0.5 , 0.5 ] , [ 126.2 , 150.8 ] , [ 8.95e - 05 , 7.49e - 05 ] )
 137.40766423357667
 butane / pentane / hexane 0.6449/0.2359/0.1192 mixture , exp : 450.22 K .
 > > > Li ( [ 0.6449 , 0.2359 , 0.1192 ] , [ 425.12 , 469.7 , 507.6 ] ,
 . . . [ 0.000255 , 0.000313 , 0.000371 ] )
 449.68261498555444
 References
 . . [ 1 ] Li , C . C . " Critical Temperature Estimation for Simple Mixtures . "
 The Canadian Journal of Chemical Engineering 49 , no . 5
 ( October 1 , 1971 ) : 709-10 . doi : 10.1002 / cjce . 5450490529.'''

implementation:
if not none_and_length_check ( [ zs , Tcs , Vcs ] ) :
    raise Exception ( 'Function inputs are incorrect format' )
denominator = sum ( zs [ i ] * Vcs [ i ] for i in range ( len ( zs ) ) )
Tcm = 0
for i in range ( len ( zs ) ) :
    Tcm += zs [ i ] * Vcs [ i ] * Tcs [ i ] / denominator
return Tcm


signature:
def Chueh_Prausnitz_Tc ( zs , Tcs , Vcs , taus ) :
    r'''Calculates critical temperature of a mixture according to
 mixing rules in [ 1 ] _ .
 . . math : :
 T _ { cm } = \ sum _ i ^ n \ theta _ i Tc _ i + \ sum _ i ^ n \ sum _ j ^ n ( \ theta _ i \ theta _ j
 \ tau _ { ij } ) T _ { ref }
 \ theta = \ frac { x _ i V _ { ci } ^ { 2/3 } } { \ sum _ { j = 1 } ^ n x _ j V _ { cj } ^ { 2/3 } }
 For a binary mxiture , this simplifies to :
 . . math : :
 T _ { cm } = \ theta _ 1T _ { c1 } + \ theta _ 2T _ { c2 } + 2 \ theta _ 1 \ theta _ 2 \ tau _ { 12}
 Parameters
 zs : array - like
 Mole fractions of all components
 Tcs : array - like
 Critical temperatures of all components , [ K ]
 Vcs : array - like
 Critical volumes of all components , [ m ^ 3 / mol ]
 taus : array - like of shape ` zs ` by ` zs `
 Interaction parameters
 Returns
 Tcm : float
 Critical temperatures of the mixture , [ K ]
 Notes
 All parameters , even if zero , must be given to this function .
 Examples
 butane / pentane / hexane 0.6449/0.2359/0.1192 mixture , exp : 450.22 K .
 > > > Chueh _ Prausnitz _ Tc ( [ 0.6449 , 0.2359 , 0.1192 ] , [ 425.12 , 469.7 , 507.6 ] ,
 . . . [ 0.000255 , 0.000313 , 0.000371 ] , [ [ 0 , 1.92681 , 6.80358 ] ,
 . . . [ 1.92681 , 0 , 1.89312 ] , [ 6.80358 , 1.89312 , 0 ] ] )
 450.1225764723492
 References
 . . [ 1 ] Chueh , P . L . , and J . M . Prausnitz . " Vapor - Liquid Equilibria at High
 Pressures : Calculation of Critical Temperatures , Volumes , and Pressures
 of Nonpolar Mixtures . " AIChE Journal 13 , no . 6 ( November 1 , 1967 ) :
 1107-13 . doi : 10.1002 / aic . 690130613.
 . . [ 2 ] Najafi , Hamidreza , Babak Maghbooli , and Mohammad Amin Sobati .
 " Prediction of True Critical Temperature of Multi - Component Mixtures :
 Extending Fast Estimation Methods . " Fluid Phase Equilibria 392
 ( April 25 , 2015 ) : 104-26 . doi : 10.1016 / j . fluid . 2015.02.001.'''

implementation:
if not none_and_length_check ( [ zs , Tcs , Vcs ] ) :
    raise Exception ( 'Function inputs are incorrect format' )
denominator = sum ( zs [ i ] * Vcs [ i ] ** ( 2 / 3. ) for i in range ( len ( zs ) ) )
Tcm = 0
for i in range ( len ( zs ) ) :
    Tcm += zs [ i ] * Vcs [ i ] ** ( 2 / 3. ) * Tcs [ i ] / denominator
    for j in range ( len ( zs ) ) :
        Tcm += ( zs [ i ] * Vcs [ i ] ** ( 2 / 3. ) / denominator ) * ( zs [ j ] * Vcs [ j ] ** ( 2 / 3. ) / denominator ) * taus [ i ] [ j ]
return Tcm


signature:
def Grieves_Thodos ( zs , Tcs , Aijs ) :
    r'''Calculates critical temperature of a mixture according to
 mixing rules in [ 1 ] _ .
 . . math : :
 T _ { cm } = \ sum _ { i } \ frac { T _ { ci } } { 1 + ( 1 / x _ i ) \ sum _ j A _ { ij } x _ j }
 For a binary mxiture , this simplifies to :
 . . math : :
 T _ { cm } = \ frac { T _ { c1 } } { 1 + ( x _ 2 / x _ 1 ) A _ { 12 } } + \ frac { T _ { c2 } }
 {1 + ( x _ 1 / x _ 2 ) A _ { 21 } }
 Parameters
 zs : array - like
 Mole fractions of all components
 Tcs : array - like
 Critical temperatures of all components , [ K ]
 Aijs : array - like of shape ` zs ` by ` zs `
 Interaction parameters
 Returns
 Tcm : float
 Critical temperatures of the mixture , [ K ]
 Notes
 All parameters , even if zero , must be given to this function .
 Giving 0s gives really bad results however .
 Examples
 butane / pentane / hexane 0.6449/0.2359/0.1192 mixture , exp : 450.22 K .
 > > > Grieves _ Thodos ( [ 0.6449 , 0.2359 , 0.1192 ] , [ 425.12 , 469.7 , 507.6 ] , [ [ 0 , 1.2503 , 1.516 ] , [ 0.799807 , 0 , 1.23843 ] , [ 0.659633 , 0.807474 , 0 ] ] )
 450.1839618758971
 References
 . . [ 1 ] Grieves , Robert B . , and George Thodos . " The Critical Temperatures of
 Multicomponent Hydrocarbon Systems . " AIChE Journal 8 , no . 4
 ( September 1 , 1962 ) : 550-53 . doi : 10.1002 / aic . 690080426.
 . . [ 2 ] Najafi , Hamidreza , Babak Maghbooli , and Mohammad Amin Sobati .
 " Prediction of True Critical Temperature of Multi - Component Mixtures :
 Extending Fast Estimation Methods . " Fluid Phase Equilibria 392
 ( April 25 , 2015 ) : 104-26 . doi : 10.1016 / j . fluid . 2015.02.001.'''

implementation:
if not none_and_length_check ( [ zs , Tcs ] ) :
    raise Exception ( 'Function inputs are incorrect format' )
Tcm = 0
for i in range ( len ( zs ) ) :
    Tcm += Tcs [ i ] / ( 1. + 1. / zs [ i ] * sum ( Aijs [ i ] [ j ] * zs [ j ] for j in range ( len ( zs ) ) ) )
return Tcm


signature:
def modified_Wilson_Tc ( zs , Tcs , Aijs ) :
    r'''Calculates critical temperature of a mixture according to
 mixing rules in [ 1 ] _ . Equation
 . . math : :
 T _ { cm } = \ sum _ i x _ i T _ { ci } + C \ sum _ i x _ i \ ln \ left ( x _ i + \ sum _ j x _ j A _ { ij } \ right ) T _ { ref }
 For a binary mxiture , this simplifies to :
 . . math : :
 T _ { cm } = x _ 1 T _ { c1 } + x _ 2 T _ { c2 } + C [ x _ 1 \ ln ( x _ 1 + x _ 2A _ { 12 } ) + x _ 2 \ ln ( x _ 2 + x _ 1 A _ { 21 } ) ]
 Parameters
 zs : float
 Mole fractions of all components
 Tcs : float
 Critical temperatures of all components , [ K ]
 Aijs : matrix
 Interaction parameters
 Returns
 Tcm : float
 Critical temperatures of the mixture , [ K ]
 Notes
 The equation and original article has been reviewed .
 [1 ] _ has 75 binary systems , and additional multicomponent mixture parameters .
 All parameters , even if zero , must be given to this function .
 2rd example is from [ 2 ] _ , for :
 butane / pentane / hexane 0.6449/0.2359/0.1192 mixture , exp : 450.22 K .
 Its result is identical to that calculated in the article .
 Examples
 > > > modified _ Wilson _ Tc ( [ 0.6449 , 0.2359 , 0.1192 ] , [ 425.12 , 469.7 , 507.6 ] ,
 . . . [ [ 0 , 1.174450 , 1.274390 ] , [ 0.835914 , 0 , 1.21038 ] ,
 . . . [ 0.746878 , 0.80677 , 0 ] ] )
 450.0305966823031
 References
 . . [ 1 ] Teja , Amyn S . , Kul B . Garg , and Richard L . Smith . " A Method for the
 Calculation of Gas - Liquid Critical Temperatures and Pressures of
 Multicomponent Mixtures . " Industrial & Engineering Chemistry Process
 Design and Development 22 , no . 4 ( 1983 ) : 672-76.
 . . [ 2 ] Najafi , Hamidreza , Babak Maghbooli , and Mohammad Amin Sobati .
 " Prediction of True Critical Temperature of Multi - Component Mixtures :
 Extending Fast Estimation Methods . " Fluid Phase Equilibria 392
 ( April 25 , 2015 ) : 104-26 . doi : 10.1016 / j . fluid . 2015.02.001.'''

implementation:
if not none_and_length_check ( [ zs , Tcs ] ) :
    raise Exception ( 'Function inputs are incorrect format' )
C = - 2500
Tcm = sum ( zs [ i ] * Tcs [ i ] for i in range ( len ( zs ) ) )
for i in range ( len ( zs ) ) :
    Tcm += C * zs [ i ] * log ( zs [ i ] + sum ( zs [ j ] * Aijs [ i ] [ j ] for j in range ( len ( zs ) ) ) )
return Tcm


signature:
def Tc_mixture ( Tcs = None , zs = None , CASRNs = None , AvailableMethods = False , Method = None ) : # pragma : no cover
    '''This function handles the retrival of a mixture ' s critical temperature .
 This API is considered experimental , and is expected to be removed in a
 future release in favor of a more complete object - oriented interface .
 > > > Tc _ mixture ( [ 400 , 550 ] , [ 0.3 , 0.7 ] )
 505.0'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if none_and_length_check ( [ Tcs ] ) :
        methods . append ( 'Simple' )
    methods . append ( 'None' )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
# This is the calculate , given the method section
if Method == 'Simple' :
    return mixing_simple ( zs , Tcs )
elif Method == 'None' :
    return None
else :
    raise Exception ( 'Failure in in function' )


signature:
def Pc_mixture ( Pcs = None , zs = None , CASRNs = None , AvailableMethods = False , Method = None ) : # pragma : no cover
    '''This function handles the retrival of a mixture ' s critical temperature .
 This API is considered experimental , and is expected to be removed in a
 future release in favor of a more complete object - oriented interface .
 > > > Pc _ mixture ( [ 2.2E7 , 1.1E7 ] , [ 0.3 , 0.7 ] )
 14300000.0'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if none_and_length_check ( [ Pcs ] ) :
        methods . append ( 'Simple' )
    methods . append ( 'None' )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
# This is the calculate , given the method section
if Method == 'Simple' :
    return mixing_simple ( zs , Pcs )
elif Method == 'None' :
    return None
else :
    raise Exception ( 'Failure in in function' )


signature:
def Chueh_Prausnitz_Vc ( zs , Vcs , nus ) :
    r'''Calculates critical volume of a mixture according to
 mixing rules in [ 1 ] _ with an interaction parameter .
 . . math : :
 V _ { cm } = \ sum _ i ^ n \ theta _ i V _ { ci } + \ sum _ i ^ n \ sum _ j ^ n ( \ theta _ i \ theta _ j \ nu _ { ij } ) V _ { ref }
 \ theta = \ frac { x _ i V _ { ci } ^ { 2/3 } } { \ sum _ { j = 1 } ^ n x _ j V _ { cj } ^ { 2/3 } }
 Parameters
 zs : float
 Mole fractions of all components
 Vcs : float
 Critical volumes of all components , [ m ^ 3 / mol ]
 nus : matrix
 Interaction parameters , [ cm ^ 3 / mol ]
 Returns
 Vcm : float
 Critical volume of the mixture , [ m ^ 3 / mol ]
 Notes
 All parameters , even if zero , must be given to this function .
 nu parameters are in cm ^ 3 / mol , but are converted to m ^ 3 / mol inside the function
 Examples
 1 - butanol / benzene 0.4271/0.5729 mixture , Vcm = 268.096 mL / mol .
 > > > Chueh _ Prausnitz _ Vc ( [ 0.4271 , 0.5729 ] , [ 0.000273 , 0.000256 ] , [ [ 0 , 5.61847 ] , [ 5.61847 , 0 ] ] )
 0.00026620503424517445
 References
 . . [ 1 ] Chueh , P . L . , and J . M . Prausnitz . " Vapor - Liquid Equilibria at High
 Pressures : Calculation of Critical Temperatures , Volumes , and Pressures
 of Nonpolar Mixtures . " AIChE Journal 13 , no . 6 ( November 1 , 1967 ) :
 1107-13 . doi : 10.1002 / aic . 690130613.
 . . [ 2 ] Najafi , Hamidreza , Babak Maghbooli , and Mohammad Amin Sobati .
 " Prediction of True Critical Volume of Multi - Component Mixtures :
 Extending Fast Estimation Methods . " Fluid Phase Equilibria 386
 ( January 25 , 2015 ) : 13-29 . doi : 10.1016 / j . fluid . 2014.11.008.'''

implementation:
if not none_and_length_check ( [ zs , Vcs ] ) : # check same - length inputs
    raise Exception ( 'Function inputs are incorrect format' )
denominator = sum ( zs [ i ] * Vcs [ i ] ** ( 2 / 3. ) for i in range ( len ( zs ) ) )
Vcm = 0
for i in range ( len ( zs ) ) :
    Vcm += zs [ i ] * Vcs [ i ] ** ( 2 / 3. ) * Vcs [ i ] / denominator
    for j in range ( len ( zs ) ) :
        Vcm += ( zs [ i ] * Vcs [ i ] ** ( 2 / 3. ) / denominator ) * ( zs [ j ] * Vcs [ j ] ** ( 2 / 3. ) / denominator ) * nus [ i ] [ j ] / 1E6
return Vcm


signature:
def modified_Wilson_Vc ( zs , Vcs , Aijs ) :
    r'''Calculates critical volume of a mixture according to
 mixing rules in [ 1 ] _ with parameters . Equation
 . . math : :
 V _ { cm } = \ sum _ i x _ i V _ { ci } + C \ sum _ i x _ i \ ln \ left ( x _ i + \ sum _ j x _ j A _ { ij } \ right ) V _ { ref }
 For a binary mxiture , this simplifies to :
 . . math : :
 V _ { cm } = x _ 1 V _ { c1 } + x _ 2 V _ { c2 } + C [ x _ 1 \ ln ( x _ 1 + x _ 2A _ { 12 } ) + x _ 2 \ ln ( x _ 2 + x _ 1 A _ { 21 } ) ]
 Parameters
 zs : float
 Mole fractions of all components
 Vcs : float
 Critical volumes of all components , [ m ^ 3 / mol ]
 Aijs : matrix
 Interaction parameters , [ cm ^ 3 / mol ]
 Returns
 Vcm : float
 Critical volume of the mixture , [ m ^ 3 / mol ]
 Notes
 The equation and original article has been reviewed .
 All parameters , even if zero , must be given to this function .
 C = - 2500
 All parameters , even if zero , must be given to this function .
 nu parameters are in cm ^ 3 / mol , but are converted to m ^ 3 / mol inside the function
 Examples
 1 - butanol / benzene 0.4271/0.5729 mixture , Vcm = 268.096 mL / mol .
 > > > modified _ Wilson _ Vc ( [ 0.4271 , 0.5729 ] , [ 0.000273 , 0.000256 ] ,
 . . . [ [ 0 , 0.6671250 ] , [ 1.3939900 , 0 ] ] )
 0.0002664335032706881
 References
 . . [ 1 ] Teja , Amyn S . , Kul B . Garg , and Richard L . Smith . " A Method for the
 Calculation of Gas - Liquid Critical Temperatures and Pressures of
 Multicomponent Mixtures . " Industrial & Engineering Chemistry Process
 Design and Development 22 , no . 4 ( 1983 ) : 672-76.
 . . [ 2 ] Najafi , Hamidreza , Babak Maghbooli , and Mohammad Amin Sobati .
 " Prediction of True Critical Temperature of Multi - Component Mixtures :
 Extending Fast Estimation Methods . " Fluid Phase Equilibria 392
 ( April 25 , 2015 ) : 104-26 . doi : 10.1016 / j . fluid . 2015.02.001.'''

implementation:
if not none_and_length_check ( [ zs , Vcs ] ) : # check same - length inputs
    raise Exception ( 'Function inputs are incorrect format' )
C = - 2500
Vcm = sum ( zs [ i ] * Vcs [ i ] for i in range ( len ( zs ) ) )
for i in range ( len ( zs ) ) :
    Vcm += C * zs [ i ] * log ( zs [ i ] + sum ( zs [ j ] * Aijs [ i ] [ j ] for j in range ( len ( zs ) ) ) ) / 1E6
return Vcm


signature:
def Vc_mixture ( Vcs = None , zs = None , CASRNs = None , AvailableMethods = False , Method = None ) : # pragma : no cover
    '''This function handles the retrival of a mixture ' s critical temperature .
 This API is considered experimental , and is expected to be removed in a
 future release in favor of a more complete object - oriented interface .
 > > > Vc _ mixture ( [ 5.6E - 5 , 2E - 4 ] , [ 0.3 , 0.7 ] )
 0.0001568'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if none_and_length_check ( [ Vcs ] ) :
        methods . append ( 'Simple' )
    methods . append ( 'None' )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
# This is the calculate , given the method section
if Method == 'Simple' :
    return mixing_simple ( zs , Vcs )
elif Method == 'None' :
    return None
else :
    raise Exception ( 'Failure in in function' )


signature:
def checkCAS ( CASRN ) :
    '''Checks if a CAS number is valid . Returns False if the parser cannot
 parse the given string . .
 Parameters
 CASRN : string
 A three - piece , dash - separated set of numbers
 Returns
 result : bool
 Boolean value if CASRN was valid . If parsing fails , return False also .
 Notes
 Check method is according to Chemical Abstract Society . However , no lookup
 to their service is performed ; therefore , this function cannot detect
 false positives .
 Function also does not support additional separators , apart from ' - ' .
 CAS numbers up to the series 1 XXX XXX - XX - X are now being issued .
 A long can hold CAS numbers up to 2 147 483-64-7
 Examples
 > > > checkCAS ( ' 7732-18-5 ' )
 True
 > > > checkCAS ( ' 77332-18-5 ' )
 False'''

implementation:
try :
    check = CASRN [ - 1 ]
    CASRN = CASRN [ : : - 1 ] [ 1 : ]
    productsum = 0
    i = 1
    for num in CASRN :
        if num == '-' :
            pass
        else :
            productsum += i * int ( num )
            i += 1
    return ( productsum % 10 == int ( check ) )
except :
    return False


signature:
def CAS_from_any ( ID , autoload = False ) :
    '''Looks up the CAS number of a chemical by searching and testing for the
 string being any of the following types of chemical identifiers :
 * Name , in IUPAC form or common form or a synonym registered in PubChem
 * InChI name , prefixed by ' InChI = 1S / ' or ' InChI = 1 / '
 * InChI key , prefixed by ' InChIKey = '
 * PubChem CID , prefixed by ' PubChem = '
 * SMILES ( prefix with ' SMILES = ' to ensure smiles parsing ; ex .
 ' C ' will return Carbon as it is an element whereas the SMILES
 interpretation for ' C ' is methane )
 * CAS number ( obsolete numbers may point to the current number )
 If the input is an ID representing an element , the following additional
 inputs may be specified as
 * Atomic symbol ( ex ' Na ' )
 * Atomic number ( as a string )
 Parameters
 ID : str
 One of the name formats described above
 Returns
 CASRN : string
 A three - piece , dash - separated set of numbers
 Notes
 An exception is raised if the name cannot be identified . The PubChem
 database includes a wide variety of other synonyms , but these may not be
 present for all chemcials .
 Examples
 > > > CAS _ from _ any ( ' water ' )
 '7732-18-5'
 > > > CAS _ from _ any ( ' InChI = 1S / C2H6O / c1-2-3 / h3H , 2H2,1H3 ' )
 '64-17-5'
 > > > CAS _ from _ any ( ' CCCCC ' )
 '124-18-5'
 > > > CAS _ from _ any ( ' InChIKey = LFQSCWFLJHTTHZ - UHFFFAOYSA - N ' )
 '64-17-5'
 > > > CAS _ from _ any ( ' pubchem = 702 ' )
 '64-17-5'
 > > > CAS _ from _ any ( ' O ' ) # only elements can be specified by symbol
 '17778-80-2' '''

implementation:
ID = ID . strip ( )
ID_lower = ID . lower ( )
if ID in periodic_table :
    if periodic_table [ ID ] . number not in homonuclear_elemental_gases :
        return periodic_table [ ID ] . CAS
    else :
        for i in [ periodic_table . symbol_to_elements , periodic_table . number_to_elements , periodic_table . CAS_to_elements ] :
            if i == periodic_table . number_to_elements :
                if int ( ID in i ) :
                    return periodic_table [ int ( ID ) ] . CAS
            else :
                if ID in i :
                    return periodic_table [ ID ] . CAS
if checkCAS ( ID ) :
    CAS_lookup = pubchem_db . search_CAS ( ID , autoload )
    if CAS_lookup :
        return CAS_lookup . CASs
    # handle the case of synonyms
    CAS_alternate_loopup = pubchem_db . search_name ( ID , autoload )
    if CAS_alternate_loopup :
        return CAS_alternate_loopup . CASs
    if not autoload :
        return CAS_from_any ( ID , autoload = True )
    raise Exception ( 'A valid CAS number was recognized, but is not in the database' )
ID_len = len ( ID )
if ID_len > 9 :
    inchi_search = False
    # normal upper case is ' InChI = 1S / '
    if ID_lower [ 0 : 9 ] == 'inchi=1s/' :
        inchi_search = ID [ 9 : ]
    elif ID_lower [ 0 : 8 ] == 'inchi=1/' :
        inchi_search = ID [ 8 : ]
    if inchi_search :
        inchi_lookup = pubchem_db . search_InChI ( inchi_search , autoload )
        if inchi_lookup :
            return inchi_lookup . CASs
        else :
            if not autoload :
                return CAS_from_any ( ID , autoload = True )
            raise Exception ( 'A valid InChI name was recognized, but it is not in the database' )
    if ID_lower [ 0 : 9 ] == 'inchikey=' :
        inchi_key_lookup = pubchem_db . search_InChI_key ( ID [ 9 : ] , autoload )
        if inchi_key_lookup :
            return inchi_key_lookup . CASs
        else :
            if not autoload :
                return CAS_from_any ( ID , autoload = True )
            raise Exception ( 'A valid InChI Key was recognized, but it is not in the database' )
if ID_len > 8 :
    if ID_lower [ 0 : 8 ] == 'pubchem=' :
        pubchem_lookup = pubchem_db . search_pubchem ( ID [ 8 : ] , autoload )
        if pubchem_lookup :
            return pubchem_lookup . CASs
        else :
            if not autoload :
                return CAS_from_any ( ID , autoload = True )
            raise Exception ( 'A PubChem integer identifier was recognized, but it is not in the database.' )
if ID_len > 7 :
    if ID_lower [ 0 : 7 ] == 'smiles=' :
        smiles_lookup = pubchem_db . search_smiles ( ID [ 7 : ] , autoload )
        if smiles_lookup :
            return smiles_lookup . CASs
        else :
            if not autoload :
                return CAS_from_any ( ID , autoload = True )
            raise Exception ( 'A SMILES identifier was recognized, but it is not in the database.' )
# Try the smiles lookup anyway
# Parsing SMILES is an option , but this is faster
# Pybel API also prints messages to console on failure
smiles_lookup = pubchem_db . search_smiles ( ID , autoload )
if smiles_lookup :
    return smiles_lookup . CASs
try :
    formula_query = pubchem_db . search_formula ( serialize_formula ( ID ) , autoload )
    if formula_query and type ( formula_query ) == ChemicalMetadata :
        return formula_query . CASs
except :
    pass
# Try a direct lookup with the name - the fastest
name_lookup = pubchem_db . search_name ( ID , autoload )
if name_lookup :
    return name_lookup . CASs
# Permutate through various name options
ID_no_space = ID . replace ( ' ' , '' )
ID_no_space_dash = ID_no_space . replace ( '-' , '' )
for name in [ ID , ID_no_space , ID_no_space_dash ] :
    for name2 in [ name , name . lower ( ) ] :
        name_lookup = pubchem_db . search_name ( name2 , autoload )
        if name_lookup :
            return name_lookup . CASs
if ID [ - 1 ] == ')' and '(' in ID : # Try to matck in the form ' water ( H2O ) '
    first_identifier , second_identifier = ID [ 0 : - 1 ] . split ( '(' , 1 )
    try :
        CAS1 = CAS_from_any ( first_identifier )
        CAS2 = CAS_from_any ( second_identifier )
        assert CAS1 == CAS2
        return CAS1
    except :
        pass
if not autoload :
    return CAS_from_any ( ID , autoload = True )
raise Exception ( 'Chemical name not recognized' )


signature:
def mixture_from_any ( ID ) :
    '''Looks up a string which may represent a mixture in the database of
 thermo to determine the key by which the composition of that mixture can
 be obtained in the dictionary ` _ MixtureDict ` .
 Parameters
 ID : str
 A string or 1 - element list containing the name which may represent a
 mixture .
 Returns
 key : str
 Key for access to the data on the mixture in ` _ MixtureDict ` .
 Notes
 White space , ' - ' , and upper case letters are removed in the search .
 Examples
 > > > mixture _ from _ any ( ' R512A ' )
 ' R512A '
 > > > mixture _ from _ any ( [ u ' air ' ] )
 ' Air ' '''

implementation:
if type ( ID ) == list :
    if len ( ID ) == 1 :
        ID = ID [ 0 ]
    else :
        raise Exception ( 'If the input is a list, the list must contain only one item.' )
ID = ID . lower ( ) . strip ( )
ID2 = ID . replace ( ' ' , '' )
ID3 = ID . replace ( '-' , '' )
for i in [ ID , ID2 , ID3 ] :
    if i in _MixtureDictLookup :
        return _MixtureDictLookup [ i ]
raise Exception ( 'Mixture name not recognized' )


signature:
def charge ( self ) :
    '''Charge of the species as an integer . Computed as a property as most
 species do not have a charge and so storing it would be a waste of
 memory .'''

implementation:
try :
    return self . _charge
except AttributeError :
    self . _charge = charge_from_formula ( self . formula )
    return self . _charge


signature:
def load_included_indentifiers ( self , file_name ) :
    '''Loads a file with newline - separated integers representing which
 chemical should be kept in memory ; ones not included are ignored .'''

implementation:
self . restrict_identifiers = True
included_identifiers = set ( )
with open ( file_name ) as f :
    [ included_identifiers . add ( int ( line ) ) for line in f ]
self . included_identifiers = included_identifiers


signature:
def EQ100 ( T , A = 0 , B = 0 , C = 0 , D = 0 , E = 0 , F = 0 , G = 0 , order = 0 ) :
    r'''DIPPR Equation # 100 . Used in calculating the molar heat capacities
 of liquids and solids , liquid thermal conductivity , and solid density .
 All parameters default to zero . As this is a straightforward polynomial ,
 no restrictions on parameters apply . Note that high - order polynomials like
 this may need large numbers of decimal places to avoid unnecessary error .
 . . math : :
 Y = A + BT + CT ^ 2 + DT ^ 3 + ET ^ 4 + FT ^ 5 + GT ^ 6
 Parameters
 T : float
 Temperature , [ K ]
 A - G : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T , integral with respect to T , and integral
 over T with respect to T are computed as follows . All derivatives and
 integrals are easily computed with SymPy .
 . . math : :
 \ frac { d Y } { dT } = B + 2 C T + 3 D T ^ { 2 } + 4 E T ^ { 3 } + 5 F T ^ { 4}
 + 6 G T ^ { 5}
 . . math : :
 \ int Y dT = A T + \ frac { B T ^ { 2 } } { 2 } + \ frac { C T ^ { 3 } } { 3 } + \ frac { D
 T ^ { 4 } } { 4 } + \ frac { E T ^ { 5 } } { 5 } + \ frac { F T ^ { 6 } } { 6 } + \ frac { G T ^ { 7 } } { 7}
 . . math : :
 \ int \ frac { Y } { T } dT = A \ log { \ left ( T \ right ) } + B T + \ frac { C T ^ { 2 } }
 {2 } + \ frac { D T ^ { 3 } } { 3 } + \ frac { E T ^ { 4 } } { 4 } + \ frac { F T ^ { 5 } } { 5}
 + \ frac { G T ^ { 6 } } { 6}
 Examples
 Water liquid heat capacity ; DIPPR coefficients normally listed in J / kmol / K .
 > > > EQ100(300 , 276370 . , - 2090.1 , 8.125 , - 0.014116 , 0.0000093701)
 75355.81000003
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''

implementation:
if order == 0 :
    return A + T * ( B + T * ( C + T * ( D + T * ( E + T * ( F + G * T ) ) ) ) )
elif order == 1 :
    return B + T * ( 2 * C + T * ( 3 * D + T * ( 4 * E + T * ( 5 * F + 6 * G * T ) ) ) )
elif order == - 1 :
    return T * ( A + T * ( B / 2 + T * ( C / 3 + T * ( D / 4 + T * ( E / 5 + T * ( F / 6 + G * T / 7 ) ) ) ) ) )
elif order == - 1j :
    return A * log ( T ) + T * ( B + T * ( C / 2 + T * ( D / 3 + T * ( E / 4 + T * ( F / 5 + G * T / 6 ) ) ) ) )
else :
    raise Exception ( order_not_found_msg )


signature:
def EQ102 ( T , A , B , C , D , order = 0 ) :
    r'''DIPPR Equation # 102 . Used in calculating vapor viscosity , vapor
 thermal conductivity , and sometimes solid heat capacity . High values of B
 raise an OverflowError .
 All 4 parameters are required . C and D are often 0.
 . . math : :
 Y = \ frac { A \ cdot T ^ B } { 1 + \ frac { C } { T } + \ frac { D } { T ^ 2 } }
 Parameters
 T : float
 Temperature , [ K ]
 A - D : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T , integral with respect to T , and integral
 over T with respect to T are computed as follows . The first derivative is
 easily computed ; the two integrals required Rubi to perform the integration .
 . . math : :
 \ frac { d Y } { dT } = \ frac { A B T ^ { B } } { T \ left ( \ frac { C } { T } + \ frac { D } { T ^ { 2 } }
 + 1 \ right ) } + \ frac { A T ^ { B } \ left ( \ frac { C } { T ^ { 2 } } + \ frac { 2 D } { T ^ { 3 } }
 \ right ) } { \ left ( \ frac { C } { T } + \ frac { D } { T ^ { 2 } } + 1 \ right ) ^ { 2 } }
 . . math : :
 \ int Y dT = - \ frac { 2 A T ^ { B + 3 } \ operatorname { hyp2f1 } { \ left ( 1 , B + 3,
 B + 4 , - \ frac { 2 T } { C - \ sqrt { C ^ { 2 } - 4 D } } \ right ) } } { \ left ( B + 3 \ right )
 \ left ( C + \ sqrt { C ^ { 2 } - 4 D } \ right ) \ sqrt { C ^ { 2 } - 4 D } } + \ frac { 2 A
 T ^ { B + 3 } \ operatorname { hyp2f1 } { \ left ( 1 , B + 3 , B + 4 , - \ frac { 2 T } { C
 + \ sqrt { C ^ { 2 } - 4 D } } \ right ) } } { \ left ( B + 3 \ right ) \ left ( C
 - \ sqrt { C ^ { 2 } - 4 D } \ right ) \ sqrt { C ^ { 2 } - 4 D } }
 . . math : :
 \ int \ frac { Y } { T } dT = - \ frac { 2 A T ^ { B + 2 } \ operatorname { hyp2f1 } { \ left
 (1 , B + 2 , B + 3 , - \ frac { 2 T } { C + \ sqrt { C ^ { 2 } - 4 D } } \ right ) } } { \ left ( B
 + 2 \ right ) \ left ( C + \ sqrt { C ^ { 2 } - 4 D } \ right ) \ sqrt { C ^ { 2 } - 4 D } }
 + \ frac { 2 A T ^ { B + 2 } \ operatorname { hyp2f1 } { \ left ( 1 , B + 2 , B + 3,
 - \ frac { 2 T } { C - \ sqrt { C ^ { 2 } - 4 D } } \ right ) } } { \ left ( B + 2 \ right )
 \ left ( C - \ sqrt { C ^ { 2 } - 4 D } \ right ) \ sqrt { C ^ { 2 } - 4 D } }
 Examples
 Water vapor viscosity ; DIPPR coefficients normally listed in Pa * s .
 > > > EQ102(300 , 1.7096E - 8 , 1.1146 , 0 , 0)
 9.860384711890639e - 06
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''


signature:
def EQ104 ( T , A , B , C , D , E , order = 0 ) :
    r'''DIPPR Equation # 104 . Often used in calculating second virial
 coefficients of gases . All 5 parameters are required .
 C , D , and E are normally large values .
 . . math : :
 Y = A + \ frac { B } { T } + \ frac { C } { T ^ 3 } + \ frac { D } { T ^ 8 } + \ frac { E } { T ^ 9}
 Parameters
 T : float
 Temperature , [ K ]
 A - E : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T , integral with respect to T , and integral
 over T with respect to T are computed as follows . All expressions can be
 obtained with SymPy readily .
 . . math : :
 \ frac { d Y } { dT } = - \ frac { B } { T ^ { 2 } } - \ frac { 3 C } { T ^ { 4 } }
 - \ frac { 8 D } { T ^ { 9 } } - \ frac { 9 E } { T ^ { 10 } }
 . . math : :
 \ int Y dT = A T + B \ log { \ left ( T \ right ) } - \ frac { 1 } { 56 T ^ { 8 } }
 \ left ( 28 C T ^ { 6 } + 8 D T + 7 E \ right )
 . . math : :
 \ int \ frac { Y } { T } dT = A \ log { \ left ( T \ right ) } - \ frac { 1 } { 72 T ^ { 9 } }
 \ left ( 72 B T ^ { 8 } + 24 C T ^ { 6 } + 9 D T + 8 E \ right )
 Examples
 Water second virial coefficient ; DIPPR coefficients normally dimensionless .
 > > > EQ104(300 , 0.02222 , - 26.38 , - 16750000 , - 3.894E19 , 3.133E21)
 -1.1204179007265156
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''


signature:
def EQ105 ( T , A , B , C , D ) :
    r'''DIPPR Equation # 105 . Often used in calculating liquid molar density .
 All 4 parameters are required . C is sometimes the fluid ' s critical
 temperature .
 . . math : :
 Y = \ frac { A } { B ^ { 1 + ( 1 - \ frac { T } { C } ) ^ D } }
 Parameters
 T : float
 Temperature , [ K ]
 A - D : float
 Parameter for the equation ; chemical and property specific [ - ]
 Returns
 Y : float
 Property [ constant - specific ]
 Notes
 This expression can be integrated in terms of the incomplete gamma function
 for dT , but for Y / T dT no integral could be found .
 Examples
 Hexane molar density ; DIPPR coefficients normally in kmol / m ^ 3.
 > > > EQ105(300 . , 0.70824 , 0.26411 , 507.6 , 0.27537)
 7.593170096339236
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''


signature:
def EQ106 ( T , Tc , A , B , C = 0 , D = 0 , E = 0 ) :
    r'''DIPPR Equation # 106 . Often used in calculating liquid surface tension ,
 and heat of vaporization .
 Only parameters A and B parameters are required ; many fits include no
 further parameters . Critical temperature is also required .
 . . math : :
 Y = A ( 1 - T _ r ) ^ { B + C T _ r + D T _ r ^ 2 + E T _ r ^ 3}
 Tr = \ frac { T } { Tc }
 Parameters
 T : float
 Temperature , [ K ]
 Tc : float
 Critical temperature , [ K ]
 A - D : float
 Parameter for the equation ; chemical and property specific [ - ]
 Returns
 Y : float
 Property [ constant - specific ]
 Notes
 The integral could not be found , but the integral over T actually could ,
 again in terms of hypergeometric functions .
 Examples
 Water surface tension ; DIPPR coefficients normally in Pa * s .
 > > > EQ106(300 , 647.096 , 0.17766 , 2.567 , - 3.3377 , 1.9699)
 0.07231499373541
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''

implementation:
Tr = T / Tc
return A * ( 1. - Tr ) ** ( B + Tr * ( C + Tr * ( D + E * Tr ) ) )


signature:
def EQ107 ( T , A = 0 , B = 0 , C = 0 , D = 0 , E = 0 , order = 0 ) :
    r'''DIPPR Equation # 107 . Often used in calculating ideal - gas heat capacity .
 All 5 parameters are required .
 Also called the Aly - Lee equation .
 . . math : :
 Y = A + B \ left [ \ frac { C / T } { \ sinh ( C / T ) } \ right ] ^ 2 + D \ left [ \ frac { E / T } {
 \ cosh ( E / T ) } \ right ] ^ 2
 Parameters
 T : float
 Temperature , [ K ]
 A - E : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T , integral with respect to T , and integral
 over T with respect to T are computed as follows . The derivative is
 obtained via SymPy ; the integrals from Wolfram Alpha .
 . . math : :
 \ frac { d Y } { dT } = \ frac { 2 B C ^ { 3 } \ cosh { \ left ( \ frac { C } { T } \ right ) } }
 { T ^ { 4 } \ sinh ^ { 3 } { \ left ( \ frac { C } { T } \ right ) } } - \ frac { 2 B C ^ { 2 } } { T ^ { 3}
 \ sinh ^ { 2 } { \ left ( \ frac { C } { T } \ right ) } } + \ frac { 2 D E ^ { 3 } \ sinh { \ left
 ( \ frac { E } { T } \ right ) } } { T ^ { 4 } \ cosh ^ { 3 } { \ left ( \ frac { E } { T } \ right ) } }
 - \ frac { 2 D E ^ { 2 } } { T ^ { 3 } \ cosh ^ { 2 } { \ left ( \ frac { E } { T } \ right ) } }
 . . math : :
 \ int Y dT = A T + \ frac { B C } { \ tanh { \ left ( \ frac { C } { T } \ right ) } }
 - D E \ tanh { \ left ( \ frac { E } { T } \ right ) }
 . . math : :
 \ int \ frac { Y } { T } dT = A \ log { \ left ( T \ right ) } + \ frac { B C } { T \ tanh {
 \ left ( \ frac { C } { T } \ right ) } } - B \ log { \ left ( \ sinh { \ left ( \ frac { C } { T }
 \ right ) } \ right ) } - \ frac { D E } { T } \ tanh { \ left ( \ frac { E } { T } \ right ) }
 + D \ log { \ left ( \ cosh { \ left ( \ frac { E } { T } \ right ) } \ right ) }
 Examples
 Water ideal gas molar heat capacity ; DIPPR coefficients normally in
 J / kmol / K
 > > > EQ107(300 . , 33363 . , 26790 . , 2610.5 , 8896 . , 1169 . )
 33585.90452768923
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE
 . . [ 2 ] Aly , Fouad A . , and Lloyd L . Lee . " Self - Consistent Equations for
 Calculating the Ideal Gas Heat Capacity , Enthalpy , and Entropy . " Fluid
 Phase Equilibria 6 , no . 3 ( January 1 , 1981 ) : 169-79.
 doi : 10.1016/0378-3812(81)85002-9.'''

implementation:
if order == 0 :
    return A + B * ( ( C / T ) / sinh ( C / T ) ) ** 2 + D * ( ( E / T ) / cosh ( E / T ) ) ** 2
elif order == 1 :
    return ( 2 * B * C ** 3 * cosh ( C / T ) / ( T ** 4 * sinh ( C / T ) ** 3 ) - 2 * B * C ** 2 / ( T ** 3 * sinh ( C / T ) ** 2 ) + 2 * D * E ** 3 * sinh ( E / T ) / ( T ** 4 * cosh ( E / T ) ** 3 ) - 2 * D * E ** 2 / ( T ** 3 * cosh ( E / T ) ** 2 ) )
elif order == - 1 :
    return A * T + B * C / tanh ( C / T ) - D * E * tanh ( E / T )
elif order == - 1j :
    return ( A * log ( T ) + B * C / tanh ( C / T ) / T - B * log ( sinh ( C / T ) ) - D * E * tanh ( E / T ) / T + D * log ( cosh ( E / T ) ) )
else :
    raise Exception ( order_not_found_msg )


signature:
def EQ114 ( T , Tc , A , B , C , D , order = 0 ) :
    r'''DIPPR Equation # 114 . Rarely used , normally as an alternate liquid
 heat capacity expression . All 4 parameters are required , as well as
 critical temperature .
 . . math : :
 Y = \ frac { A ^ 2 } { \ tau } + B - 2AC \ tau - AD \ tau ^ 2 - \ frac { 1 } { 3 } C ^ 2 \ tau ^ 3
 - \ frac { 1 } { 2 } CD \ tau ^ 4 - \ frac { 1 } { 5 } D ^ 2 \ tau ^ 5
 \ tau = 1 - \ frac { T } { Tc }
 Parameters
 T : float
 Temperature , [ K ]
 Tc : float
 Critical temperature , [ K ]
 A - D : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T , integral with respect to T , and integral
 over T with respect to T are computed as follows . All expressions can be
 obtained with SymPy readily .
 . . math : :
 \ frac { d Y } { dT } = \ frac { A ^ { 2 } } { T _ { c } \ left ( - \ frac { T } { T _ { c } }
 + 1 \ right ) ^ { 2 } } + \ frac { 2 A } { T _ { c } } C + \ frac { 2 A } { T _ { c } } D \ left (
 - \ frac { T } { T _ { c } } + 1 \ right ) + \ frac { C ^ { 2 } } { T _ { c } } \ left (
 - \ frac { T } { T _ { c } } + 1 \ right ) ^ { 2 } + \ frac { 2 C } { T _ { c } } D \ left (
 - \ frac { T } { T _ { c } } + 1 \ right ) ^ { 3 } + \ frac { D ^ { 2 } } { T _ { c } } \ left (
 - \ frac { T } { T _ { c } } + 1 \ right ) ^ { 4}
 . . math : :
 \ int Y dT = - A ^ { 2 } T _ { c } \ log { \ left ( T - T _ { c } \ right ) } + \ frac { D ^ { 2}
 T ^ { 6 } } { 30 T _ { c } ^ { 5 } } - \ frac { T ^ { 5 } } { 10 T _ { c } ^ { 4 } } \ left ( C D + 2 D ^ { 2}
 \ right ) + \ frac { T ^ { 4 } } { 12 T _ { c } ^ { 3 } } \ left ( C ^ { 2 } + 6 C D + 6 D ^ { 2}
 \ right ) - \ frac { T ^ { 3 } } { 3 T _ { c } ^ { 2 } } \ left ( A D + C ^ { 2 } + 3 C D
 + 2 D ^ { 2 } \ right ) + \ frac { T ^ { 2 } } { 2 T _ { c } } \ left ( 2 A C + 2 A D + C ^ { 2}
 + 2 C D + D ^ { 2 } \ right ) + T \ left ( - 2 A C - A D + B - \ frac { C ^ { 2 } } { 3}
 - \ frac { C D } { 2 } - \ frac { D ^ { 2 } } { 5 } \ right )
 . . math : :
 \ int \ frac { Y } { T } dT = - A ^ { 2 } \ log { \ left ( T + \ frac { - 60 A ^ { 2 } T _ { c }
 + 60 A C T _ { c } + 30 A D T _ { c } - 30 B T _ { c } + 10 C ^ { 2 } T _ { c }
 + 15 C D T _ { c } + 6 D ^ { 2 } T _ { c } } { 60 A ^ { 2 } - 60 A C - 30 A D + 30 B
 - 10 C ^ { 2 } - 15 C D - 6 D ^ { 2 } } \ right ) } + \ frac { D ^ { 2 } T ^ { 5 } }
 {25 T _ { c } ^ { 5 } } - \ frac { T ^ { 4 } } { 8 T _ { c } ^ { 4 } } \ left ( C D + 2 D ^ { 2}
 \ right ) + \ frac { T ^ { 3 } } { 9 T _ { c } ^ { 3 } } \ left ( C ^ { 2 } + 6 C D + 6 D ^ { 2}
 \ right ) - \ frac { T ^ { 2 } } { 2 T _ { c } ^ { 2 } } \ left ( A D + C ^ { 2 } + 3 C D
 + 2 D ^ { 2 } \ right ) + \ frac { T } { T _ { c } } \ left ( 2 A C + 2 A D + C ^ { 2}
 + 2 C D + D ^ { 2 } \ right ) + \ frac { 1 } { 30 } \ left ( 30 A ^ { 2 } - 60 A C
 - 30 A D + 30 B - 10 C ^ { 2 } - 15 C D - 6 D ^ { 2 } \ right ) \ log { \ left
 ( T + \ frac { 1 } { 60 A ^ { 2 } - 60 A C - 30 A D + 30 B - 10 C ^ { 2 } - 15 C D
 - 6 D ^ { 2 } } \ left ( - 30 A ^ { 2 } T _ { c } + 60 A C T _ { c } + 30 A D T _ { c }
 - 30 B T _ { c } + 10 C ^ { 2 } T _ { c } + 15 C D T _ { c } + 6 D ^ { 2 } T _ { c }
 + T _ { c } \ left ( 30 A ^ { 2 } - 60 A C - 30 A D + 30 B - 10 C ^ { 2 } - 15 C D
 - 6 D ^ { 2 } \ right ) \ right ) \ right ) }
 Strictly speaking , the integral over T has an imaginary component , but
 only the real component is relevant and the complex part discarded .
 Examples
 Hydrogen liquid heat capacity ; DIPPR coefficients normally in J / kmol / K .
 > > > EQ114(20 , 33.19 , 66.653 , 6765.9 , - 123.63 , 478.27)
 19423.948911676463
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''


signature:
def EQ115 ( T , A , B , C = 0 , D = 0 , E = 0 ) :
    r'''DIPPR Equation # 115 . No major uses ; has been used as an alternate
 liquid viscosity expression , and as a model for vapor pressure .
 Only parameters A and B are required .
 . . math : :
 Y = \ exp \ left ( A + \ frac { B } { T } + C \ log T + D T ^ 2 + \ frac { E } { T ^ 2 } \ right )
 Parameters
 T : float
 Temperature , [ K ]
 A - E : float
 Parameter for the equation ; chemical and property specific [ - ]
 Returns
 Y : float
 Property [ constant - specific ]
 Notes
 No coefficients found for this expression .
 This function is not integrable for either dT or Y / T dT .
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''

implementation: return exp ( A + B / T + C * log ( T ) + D * T ** 2 + E / T ** 2 )


signature:
def EQ116 ( T , Tc , A , B , C , D , E , order = 0 ) :
    r'''DIPPR Equation # 116 . Used to describe the molar density of water fairly
 precisely ; no other uses listed . All 5 parameters are needed , as well as
 the critical temperature .
 . . math : :
 Y = A + B \ tau ^ { 0.35 } + C \ tau ^ { 2/3 } + D \ tau + E \ tau ^ { 4/3}
 \ tau = 1 - \ frac { T } { T _ c }
 Parameters
 T : float
 Temperature , [ K ]
 Tc : float
 Critical temperature , [ K ]
 A - E : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T and integral with respect to T are
 computed as follows . The integral divided by T with respect to T has an
 extremely complicated ( but still elementary ) integral which can be read
 from the source . It was computed with Rubi ; the other expressions can
 readily be obtained with SymPy .
 . . math : :
 \ frac { d Y } { dT } = - \ frac { 7 B } { 20 T _ c \ left ( - \ frac { T } { T _ c } + 1 \ right ) ^ {
 \ frac { 13 } { 20 } } } - \ frac { 2 C } { 3 T _ c \ sqrt [ 3 ] { - \ frac { T } { T _ c } + 1 } }
 - \ frac { D } { T _ c } - \ frac { 4 E } { 3 T _ c } \ sqrt [ 3 ] { - \ frac { T } { T _ c } + 1}
 . . math : :
 \ int Y dT = A T - \ frac { 20 B } { 27 } T _ c \ left ( - \ frac { T } { T _ c } + 1 \ right ) ^ {
 \ frac { 27 } { 20 } } - \ frac { 3 C } { 5 } T _ c \ left ( - \ frac { T } { T _ c } + 1 \ right ) ^ {
 \ frac { 5 } { 3 } } + D \ left ( - \ frac { T ^ { 2 } } { 2 T _ c } + T \ right ) - \ frac { 3 E } { 7}
 T _ c \ left ( - \ frac { T } { T _ c } + 1 \ right ) ^ { \ frac { 7 } { 3 } }
 Examples
 Water liquid molar density ; DIPPR coefficients normally in kmol / m ^ 3.
 > > > EQ116(300 . , 647.096 , 17.863 , 58.606 , - 95.396 , 213.89 , - 141.26)
 55.17615446406527
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''


signature:
def EQ127 ( T , A , B , C , D , E , F , G , order = 0 ) :
    r'''DIPPR Equation # 127 . Rarely used , and then only in calculating
 ideal - gas heat capacity . All 7 parameters are required .
 . . math : :
 Y = A + B \ left [ \ frac { \ left ( \ frac { C } { T } \ right ) ^ 2 \ exp \ left ( \ frac { C } { T }
 \ right ) } { \ left ( \ exp \ frac { C } { T } - 1 \ right ) ^ 2 } \ right ]
 + D \ left [ \ frac { \ left ( \ frac { E } { T } \ right ) ^ 2 \ exp \ left ( \ frac { E } { T } \ right ) }
 { \ left ( \ exp \ frac { E } { T } - 1 \ right ) ^ 2 } \ right ]
 + F \ left [ \ frac { \ left ( \ frac { G } { T } \ right ) ^ 2 \ exp \ left ( \ frac { G } { T } \ right ) }
 { \ left ( \ exp \ frac { G } { T } - 1 \ right ) ^ 2 } \ right ]
 Parameters
 T : float
 Temperature , [ K ]
 A - G : float
 Parameter for the equation ; chemical and property specific [ - ]
 order : int , optional
 Order of the calculation . 0 for the calculation of the result itself ;
 for 1 , the first derivative of the property is returned , for
 -1 , the indefinite integral of the property with respect to temperature
 is returned ; and for - 1j , the indefinite integral of the property
 divided by temperature with respect to temperature is returned . No
 other integrals or derivatives are implemented , and an exception will
 be raised if any other order is given .
 Returns
 Y : float
 Property [ constant - specific ; if order = = 1 , property / K ; if order = = - 1,
 property * K ; if order = = - 1j , unchanged from default ]
 Notes
 The derivative with respect to T , integral with respect to T , and integral
 over T with respect to T are computed as follows . All expressions can be
 obtained with SymPy readily .
 . . math : :
 \ frac { d Y } { dT } = - \ frac { B C ^ { 3 } e ^ { \ frac { C } { T } } } { T ^ { 4}
 \ left ( e ^ { \ frac { C } { T } } - 1 \ right ) ^ { 2 } } + \ frac { 2 B C ^ { 3}
 e ^ { \ frac { 2 C } { T } } } { T ^ { 4 } \ left ( e ^ { \ frac { C } { T } } - 1 \ right ) ^ { 3 } }
 - \ frac { 2 B C ^ { 2 } e ^ { \ frac { C } { T } } } { T ^ { 3 } \ left ( e ^ { \ frac { C } { T } }
 - 1 \ right ) ^ { 2 } } - \ frac { D E ^ { 3 } e ^ { \ frac { E } { T } } } { T ^ { 4}
 \ left ( e ^ { \ frac { E } { T } } - 1 \ right ) ^ { 2 } } + \ frac { 2 D E ^ { 3}
 e ^ { \ frac { 2 E } { T } } } { T ^ { 4 } \ left ( e ^ { \ frac { E } { T } } - 1 \ right ) ^ { 3 } }
 - \ frac { 2 D E ^ { 2 } e ^ { \ frac { E } { T } } } { T ^ { 3 } \ left ( e ^ { \ frac { E } { T } }
 - 1 \ right ) ^ { 2 } } - \ frac { F G ^ { 3 } e ^ { \ frac { G } { T } } } { T ^ { 4}
 \ left ( e ^ { \ frac { G } { T } } - 1 \ right ) ^ { 2 } } + \ frac { 2 F G ^ { 3}
 e ^ { \ frac { 2 G } { T } } } { T ^ { 4 } \ left ( e ^ { \ frac { G } { T } } - 1 \ right ) ^ { 3 } }
 - \ frac { 2 F G ^ { 2 } e ^ { \ frac { G } { T } } } { T ^ { 3 } \ left ( e ^ { \ frac { G } { T } }
 - 1 \ right ) ^ { 2 } }
 . . math : :
 \ int Y dT = A T + \ frac { B C ^ { 2 } } { C e ^ { \ frac { C } { T } } - C }
 + \ frac { D E ^ { 2 } } { E e ^ { \ frac { E } { T } } - E }
 + \ frac { F G ^ { 2 } } { G e ^ { \ frac { G } { T } } - G }
 . . math : :
 \ int \ frac { Y } { T } dT = A \ log { \ left ( T \ right ) } + B C ^ { 2 } \ left (
 \ frac { 1 } { C T e ^ { \ frac { C } { T } } - C T } + \ frac { 1 } { C T } - \ frac { 1 } { C ^ { 2 } }
 \ log { \ left ( e ^ { \ frac { C } { T } } - 1 \ right ) } \ right ) + D E ^ { 2 } \ left (
 \ frac { 1 } { E T e ^ { \ frac { E } { T } } - E T } + \ frac { 1 } { E T } - \ frac { 1 } { E ^ { 2 } }
 \ log { \ left ( e ^ { \ frac { E } { T } } - 1 \ right ) } \ right ) + F G ^ { 2 } \ left (
 \ frac { 1 } { G T e ^ { \ frac { G } { T } } - G T } + \ frac { 1 } { G T } - \ frac { 1 } { G ^ { 2 } }
 \ log { \ left ( e ^ { \ frac { G } { T } } - 1 \ right ) } \ right )
 Examples
 Ideal gas heat capacity of methanol ; DIPPR coefficients normally in
 J / kmol / K
 > > > EQ127(20 . , 3.3258E4 , 3.6199E4 , 1.2057E3 , 1.5373E7 , 3.2122E3 , - 1.5318E7 , 3.2122E3)
 33258.0
 References
 . . [ 1 ] Design Institute for Physical Properties , 1996 . DIPPR Project 801
 DIPPR / AIChE'''


signature:
def CoolProp_T_dependent_property ( T , CASRN , prop , phase ) :
    r'''Calculates a property of a chemical in either the liquid or gas phase
 as a function of temperature only . This means that the property is
 either at 1 atm or along the saturation curve .
 Parameters
 T : float
 Temperature of the fluid [ K ]
 CASRN : str
 CAS number of the fluid
 prop : str
 CoolProp string shortcut for desired property
 phase : str
 Either ' l ' or ' g ' for liquid or gas properties respectively
 Returns
 prop : float
 Desired chemical property , [ units ]
 Notes
 For liquids above their boiling point , the liquid property is found on the
 saturation line ( at higher pressures ) . Under their boiling point , the
 property is calculated at 1 atm .
 No liquid calculations are permitted above the critical temperature .
 For gases under the chemical ' s boiling point , the gas property is found
 on the saturation line ( at sub - atmospheric pressures ) . Above the boiling
 point , the property is calculated at 1 atm .
 An exception is raised if the desired CAS is not supported , or if CoolProp
 is not available .
 The list of strings acceptable as an input for property types is :
 http : / / www . coolprop . org / coolprop / HighLevelAPI . html # table - of - string - inputs - to - propssi - function
 Examples
 Water at STP according to IAPWS - 95
 > > > CoolProp _ T _ dependent _ property ( 298.15 , ' 7732-18-5 ' , ' D ' , ' l ' )
 997.047636760347
 References
 . . [ 1 ] Bell , Ian H . , Jorrit Wronski , Sylvain Quoilin , and Vincent Lemort .
 " Pure and Pseudo - Pure Fluid Thermophysical Property Evaluation and the
 Open - Source Thermophysical Property Library CoolProp . " Industrial &
 Engineering Chemistry Research 53 , no . 6 ( February 12 , 2014 ) :
 2498-2508 . doi : 10.1021 / ie4033999 . http : / / www . coolprop . org /'''

implementation:
if not has_CoolProp : # pragma : no cover
    raise Exception ( 'CoolProp library is not installed' )
if CASRN not in coolprop_dict :
    raise Exception ( 'CASRN not in list of supported fluids' )
Tc = coolprop_fluids [ CASRN ] . Tc
T = float ( T )
# Do not allow custom objects here
if phase == 'l' :
    if T > Tc :
        raise Exception ( 'For liquid properties, must be under the critical temperature.' )
    if PhaseSI ( 'T' , T , 'P' , 101325 , CASRN ) in [ u'liquid' , u'supercritical_liquid' ] :
        return PropsSI ( prop , 'T' , T , 'P' , 101325 , CASRN )
    else :
        return PropsSI ( prop , 'T' , T , 'Q' , 0 , CASRN )
elif phase == 'g' :
    if PhaseSI ( 'T' , T , 'P' , 101325 , CASRN ) == 'gas' :
        return PropsSI ( prop , 'T' , T , 'P' , 101325 , CASRN )
    else :
        if T < Tc :
            return PropsSI ( prop , 'T' , T , 'Q' , 1 , CASRN )
        else : # catch supercritical _ gas and friends
            return PropsSI ( prop , 'T' , T , 'P' , 101325 , CASRN )
else :
    raise Exception ( 'Error in CoolProp property function' )


signature:
def Stockmayer ( Tm = None , Tb = None , Tc = None , Zc = None , omega = None , CASRN = '' , AvailableMethods = False , Method = None ) :
    r'''This function handles the retrieval or calculation a chemical ' s
 Stockmayer parameter . Values are available from one source with lookup
 based on CASRNs , or can be estimated from 7 CSP methods .
 Will automatically select a data source to use if no Method is provided ;
 returns None if the data is not available .
 Prefered sources are ' Magalhães , Lito , Da Silva , and Silva ( 2013 ) ' for
 common chemicals which had valies listed in that source , and the CSP method
 ` Tee , Gotoh , and Stewart CSP with Tc , omega ( 1966 ) ` for chemicals which
 don ' t .
 Examples
 > > > Stockmayer ( CASRN = ' 64-17-5 ' )
 1291.41
 Parameters
 Tm : float , optional
 Melting temperature of fluid [ K ]
 Tb : float , optional
 Boiling temperature of fluid [ K ]
 Tc : float , optional
 Critical temperature , [ K ]
 Zc : float , optional
 Critical compressibility , [ - ]
 omega : float , optional
 Acentric factor of compound , [ - ]
 CASRN : string , optional
 CASRN [ - ]
 Returns
 epsilon _ k : float
 Lennard - Jones depth of potential - energy minimum over k , [ K ]
 methods : list , only returned if AvailableMethods = = True
 List of methods which can be used to obtain epsilon with the given
 inputs
 Other Parameters
 Method : string , optional
 A string for the method name to use , as defined by constants in
 Stockmayer _ methods
 AvailableMethods : bool , optional
 If True , function will determine which methods can be used to obtain
 epsilon for the desired chemical , and will return methods instead of
 epsilon
 Notes
 These values are somewhat rough , as they attempt to pigeonhole a chemical
 into L - J behavior .
 The tabulated data is from [ 2 ] _ , for 322 chemicals .
 References
 . . [ 1 ] Bird , R . Byron , Warren E . Stewart , and Edwin N . Lightfoot .
 Transport Phenomena , Revised 2nd Edition . New York :
 John Wiley & Sons , Inc . , 2006
 . . [ 2 ] Magalhães , Ana L . , Patrícia F . Lito , Francisco A . Da Silva , and
 Carlos M . Silva . " Simple and Accurate Correlations for Diffusion
 Coefficients of Solutes in Liquids and Supercritical Fluids over Wide
 Ranges of Temperature and Density . " The Journal of Supercritical Fluids
 76 ( April 2013 ) : 94-114 . doi : 10.1016 / j . supflu . 2013.02.002.'''

implementation:
def list_methods ( ) :
    methods = [ ]
    if CASRN in MagalhaesLJ_data . index :
        methods . append ( MAGALHAES )
    if Tc and omega :
        methods . append ( TEEGOTOSTEWARD2 )
    if Tc :
        methods . append ( FLYNN )
        methods . append ( BSLC )
        methods . append ( TEEGOTOSTEWARD1 )
    if Tb :
        methods . append ( BSLB )
    if Tm :
        methods . append ( BSLM )
    if Tc and Zc :
        methods . append ( STIELTHODOS )
    methods . append ( NONE )
    return methods
if AvailableMethods :
    return list_methods ( )
if not Method :
    Method = list_methods ( ) [ 0 ]
if Method == FLYNN :
    epsilon = epsilon_Flynn ( Tc )
elif Method == BSLC :
    epsilon = epsilon_Bird_Stewart_Lightfoot_critical ( Tc )
elif Method == BSLB :
    epsilon = epsilon_Bird_Stewart_Lightfoot_boiling ( Tb )
elif Method == BSLM :
    epsilon = epsilon_Bird_Stewart_Lightfoot_melting ( Tm )
elif Method == STIELTHODOS :
    epsilon = epsilon_Stiel_Thodos ( Tc , Zc )
elif Method == TEEGOTOSTEWARD1 :
    epsilon = epsilon_Tee_Gotoh_Steward_1 ( Tc )
elif Method == TEEGOTOSTEWARD2 :
    epsilon = epsilon_Tee_Gotoh_Steward_2 ( Tc , omega )
elif Method == MAGALHAES :
    epsilon = float ( MagalhaesLJ_data . at [ CASRN , "epsilon" ] )
elif Method == NONE :
    epsilon = None
else :
    raise Exception ( 'Failure in in function' )
return epsilon