Open Neverland-ss opened 2 years ago
The sigma profiles should not be put in with the existing profiles, you should put them in another folder and change the paths accordingly. You should not need to recompile cCOSMO either.
Thank you for your reply! I have tried to put them in another folder and change the paths accordingly. I tried to add my database into profiles fold and change path to mine and run the testit.py in terminal. Like: dbVT = cCOSMO.VirginiaTechProfileDatabase( here+"/profiles/VT2005/MineDatabase/Sigma_Profile_Database.txt", here+"/profiles/VT2005/MineDatabase/Sigma_Profiles_v1/")
It says : dbVT = cCOSMO.VirginiaTechProfileDatabase( ValueError: Need at least 6 entries in line
Then, I tried to change cCOSMO.VirginiaTechProfileDatabase to cCOSMO.MineDatabase. Like: dbVT = cCOSMO.MineDatabase(here+"/profiles/MineDatabase/Sigma_Profile_Database.txt", here+"/profiles/MineDatabase/Sigma_Profiles_v1/") it says: AttributeError: module 'cCOSMO' has no attribute 'MineDatabase'.
I don't know why that would happen. Could you please help me with this problem. THANK YOU SO MUCH!
In pseudocode, you need something like this:
import cCOSMO
db = cCOSMO.VirginiaTechProfileDatabase(
"myVT2005/Sigma_Profile_Database.txt",
"myVT2005/Sigma_Profiles/")
where you make the Sigma_Profile_Database.txt
in the same format as the original, and put your profile in the folder Sigma_Profiles
Thank you so much for your kindness reply!
I do change the code like this:
import cCOSMO here = os.path.abspath(os.path.dirname(__file__)) dbVT = cCOSMO.VirginiaTechProfileDatabase( here+ "/profiles/VT2005/Sigma_Profile_Database_Index_v1.txt", here+ "/profiles/VT2005/Sigma_Profiles_v1/")
And for the folder, I add it to VT2005 and make a new txt in the same format as the original.
Unfortunately, it still give me this hit:
in
What are the contents of your Sigma_Profile_Database_Index_v1.txt and your sigma profile?
For Sigma_Profile_Database_Index_v1, because I want to calculate some not existing chemical compounds, so some information like cas, cosmo segments ...were just made up.
For sigma profile, I use the fortran program provided by VT group.
The metadata file needs to be in the same exact format as the original. Are you missing the last column?
Actually, I think they are the same. I copy it directly from the original one.
Can you please attach your file? I think the delimiters might be wrong
And please attach one of your sigma profiles, I want to test on my side.
Sigma_Profile_Database_Index_v1.txt my-0001-PROF.txt my-0002-PROF.txt my-0003-PROF.txt my-0004-PROF.txt Sorry, I add it here. you so much!
First problem: your metadata file doesn't use tabs for the delimiter, you have to use the same format Second problem: your sigma profile file uses tabs, not spaces
I see! I will try again. Thank you sooooo much!
Also, you need a single delimiter in all cases
Once you get that sorted, you want something like:
import cCOSMO
names = ['C1H1']
db = cCOSMO.VirginiaTechProfileDatabase(
"profiles/VT2005test/Sigma_Profile_Database_Index_v1.txt",
"profiles/VT2005test/")
# Add the fluids we want into the database
for name in names:
iden = db.normalize_identifier(name)
print(iden)
db.add_profile(iden)
COSMO = cCOSMO.COSMO1(names, db)
T = 300
composition = [0.5, 0.5]
print(COSMO.get_lngamma_comb(T, composition) + COSMO.get_lngamma_resid(T, composition))
This works!!! Thank you a lot!
Hello, Professor. I got another problem, would you please give me some help?
I want to add some new sigma profiles, and I got stuck at the file format:
Waiting for your reply. Sorry for asking for help again.
I figured it out. Thank you so much!!
Hi professor, thank you so much for sharing this amazing work. I am new to cmake. I want to add the sigma profile I calculate to cCOSMO and then use it for later calculation, but when I directly adding it to vt-2005 database, it will say wrong. So, I was wondering if I want to add new database, is that means I need to rewrite a code to make new cCOSMO module?