def calculate_P(self, T, P, method):
if method == EOS:<EOL><INDENT>self.eos[<NUM_LIT:0>] = self.eos[<NUM_LIT:0>].to_TP(T=T, P=P)<EOL>Vm = self.eos[<NUM_LIT:0>].V_g<EOL><DEDENT>elif method == TSONOPOULOS_EXTENDED:<EOL><INDENT>B = BVirial_Tsonopoulos_extended(T, self.Tc, self.Pc, self.omega, dipole=self.dipole)<EOL>Vm = ideal_gas(T, P) + B<EOL><DEDENT>elif method == TSONOPOULOS:<EOL><INDENT>B = BVirial_Tsonopoulos(T, self.Tc, self.Pc, self.omega)<EOL>Vm = ideal_gas(T, P) + B<EOL><DEDENT>elif method == ABBOTT:<EOL><INDENT>B = BVirial_Abbott(T, self.Tc, self.Pc, self.omega)<EOL>Vm = ideal_gas(T, P) + B<EOL><DEDENT>elif method == PITZER_CURL:<EOL><INDENT>B = BVirial_Pitzer_Curl(T, self.Tc, self.Pc, self.omega)<EOL>Vm = ideal_gas(T, P) + B<EOL><DEDENT>elif method == CRC_VIRIAL:<EOL><INDENT>a1, a2, a3, a4, a5 = self.CRC_VIRIAL_coeffs<EOL>t = <NUM_LIT>/T - <NUM_LIT:1.><EOL>B = (a1 + a2*t + a3*t**<NUM_LIT:2> + a4*t**<NUM_LIT:3> + a5*t**<NUM_LIT:4>)/<NUM_LIT><EOL>Vm = ideal_gas(T, P) + B<EOL><DEDENT>elif method == IDEAL:<EOL><INDENT>Vm = ideal_gas(T, P)<EOL><DEDENT>elif method == COOLPROP:<EOL><INDENT>Vm = <NUM_LIT:1.>/PropsSI('<STR_LIT>', '<STR_LIT:T>', T, '<STR_LIT:P>', P, self.CASRN)<EOL><DEDENT>elif method in self.tabular_data:<EOL><INDENT>Vm = self.interpolate_P(T, P, method)<EOL><DEDENT>return Vm<EOL>
r'''Method to calculate pressure-dependent gas molar volume at
        temperature `T` and pressure `P` with a given method.

        This method has no exception handling; see `TP_dependent_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate molar volume, [K]
        P : float
            Pressure at which to calculate molar volume, [K]
        method : str
            Name of the method to use

        Returns
        -------
        Vm : float
            Molar volume of the gas at T and P, [m^3/mol]