Closed amkoch closed 3 years ago
Can you please show the calls you tried to make resulting in this error? Otherwise I have no idea where to start with debugging.
Of course. This code below runs if use COSMO1 (excluding lngamma_disp), but not for COSMO3. When I singled out each one of the different lngamma calls, the code would yield a result for lngamma.comb and lngamma.disp, but the attributes lngamma and lngamma.resid cause the kernel to die.
import cCOSMO
import numpy as np
db = cCOSMO.VirginiaTechProfileDatabase(
"profiles/VT2005/Sigma_Profile_Database_Index_v2.txt",
"profiles/VT2005/Sigma_Profiles_v2/")
identifiers = [ "0003", "0002"]
for iden in identifiers:
db.add_profile(iden)
prof = db.get_profile(iden)
print(prof.name)
COSMO = cCOSMO.COSMO3(identifiers, db)
T = 250;
z = np.array([0.89, 0.11])
disp = COSMO.get_lngamma_disp(z)
comb = COSMO.get_lngamma_comb(T,z)
resid = COSMO.get_lngamma_resid(T,z)
lngamma = COSMO.get_lngamma(T, z)
Well, the error is now clear - you are using the VT database, but trying to use COSMO3, which requires the three profiles, so you need to use the UD database.
Also, I cleaned up your block of code.
Thank you. That should fix the issue.
When I use cosmo3 to calculate either lngamma or lngamma_resid, this causes my kernel to die.
I have no issues when I calculate lngamma_disp or lngamma_comb.