MaginnGroup / Cassandra

Cassandra is a Monte Carlo package to conduct atomistic simulations.
https://cassandra.nd.edu/
GNU General Public License v3.0
39 stars 20 forks source link

Insertion of a huge number of molecules in a GCMC simulation #136

Closed camjjr closed 1 year ago

camjjr commented 1 year ago

Hi everyone,

I am facing some troubles with GCMC in Cassandra and I want to check if it is a bug in the software. First, I am trying to simulate the insertion of gas molecules (n2/co2) inside different CNTs. In this case, the reservoir is composed of 85% of N2 and 15% of CO2 (the chemical potentials were obtained using the widom method). The problem is that I would expect as I increase the radius of the CNT, the proportion of N2/CO2 inside the CNT would reach the value of the reservoir. However, for all CNT that I tested in Cassandra, only N2 is inside the CNTs at the end of the simulations. I tested the same simulations in lammps and, with this software, I see the gas inside the CNT reaching the limit of bulk gas. Is there a problem with my input? I will attach one that I used here. The bulk simulation in Cassandra seems fine. with_restriction.inp.txt without_restriction.inp.txt

Second, I am also trying to obtain the structure of the gas outside the CNTs. So, I performed a GCMC simulation without the restriction of gas inside the CNT. In this case, the gas seems to condensate outside the CNT in the whole simulation box, which seems unphysical. Instead of gas, the simulations seem to be a liquid. I also tested it in lammps and it shows no condensation. Can you check my inputs?

Thank you

WhatsApp Image 2022-11-07 at 14 54 05

romanielo commented 1 year ago

Hi Camjjr ,

I took a look in your inputfile. And It seems to me that you did not performed the creation of new libraries. As you give the mcf files in the follow order: CNT N2 CO2 it will took CNT as specie1, N2 as specie2 and CO2 as specie3. Then you should have fragment for specie1. See your input file

Fragment_Files

species2/frag1/frag1.dat 1 species1/frag1/frag1.dat 2

Also if you are using a custom mixing rule then I will expect 3 species and the software will ask about

C_s1 N-s2 C_s1 M_s2 C_s1 C_3 C_s1 O_s3 N_s2 C_s3 and so on

but you have C N_s1 118.82 3.011 C M_s1 0.0 0.0 N_s1 M_s1 0.0 0.0 C C_s1 74.466 3.09 C O_s1 85.189 3.09 C_s1 N_s1 31.82 3.03 C_s1 M_s1 0.0 0.0 O_s1 N_s1 53.83 3.17

And also when you are running simulation with solid you do not enter chemical potential for the solid. Therefore, if you do not have any movimment for specie 1 (solid) what is correct the chemical potential should be

Chemical_Potential_Info

-41.28 -47.55

But as you are entering

Chemical_Potential_Info

  1. -41.28 -47.55

I suppose there are some errors in your input file

Best Lucienne

Did you run the script to create the fragment libraries?


De: camjjr @.> Enviado: segunda-feira, 7 de novembro de 2022 15:31 Para: MaginnGroup/Cassandra @.> Cc: Subscribed @.***> Assunto: [MaginnGroup/Cassandra] Insertion of a huge number of molecules in a GCMC simulation (Issue #136)

Hi everyone,

I am facing some troubles with GCMC in Cassandra and I want to check if it is a bug in the software. First, I am trying to simulate the insertion of gas molecules (n2/co2) inside different CNTs. In this case, the reservoir is composed of 85% of N2 and 15% of CO2 (the chemical potentials were obtained using the widom method). The problem is that I would expect as I increase the radius of the CNT, the proportion of N2/CO2 inside the CNT would reach the value of the reservoir. However, for all CNT that I tested in Cassandra, only N2 is inside the CNTs at the end of the simulations. I tested the same simulations in lammps and, with this software, I see the gas inside the CNT reaching the limit of bulk gas. Is there a problem with my input? I will attach one that I used here. The bulk simulation in Cassandra seems fine. with_restriction.inp.txthttps://github.com/MaginnGroup/Cassandra/files/9954234/with_restriction.inp.txt without_restriction.inp.txthttps://github.com/MaginnGroup/Cassandra/files/9954235/without_restriction.inp.txt

Second, I am also trying to obtain the structure of the gas outside the CNTs. So, I performed a GCMC simulation without the restriction of gas inside the CNT. In this case, the gas seems to condensate outside the CNT in the whole simulation box, which seems unphysical. Instead of gas, the simulations seem to be a liquid. I also tested it in lammps and it shows no condensation. Can you check my inputs?

Thank you

[WhatsApp Image 2022-11-07 at 14 54 05]https://user-images.githubusercontent.com/80985110/200380767-adaa2f06-9ced-470a-a275-31e5a5f54926.jpeg

— Reply to this email directly, view it on GitHubhttps://github.com/MaginnGroup/Cassandra/issues/136, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEY63FN3XNQJVUQHURPSDPDWHFDI5ANCNFSM6AAAAAARZPLX2E. You are receiving this because you are subscribed to this thread.Message ID: @.***>

camjjr commented 1 year ago

Hi Lucienne,

Thank you for taking the time to read my input files. I will enumerate the problems that you mentioned.

1) Should I create a fragment file for the cnt? The documention says "Since the solid structure will be rigid, no bond distances, angle parameters, or dihedral parameters are needed in the MCF. The library_setup.py script will not create a fragment library since the MCF lists zero fragments." Link: https://cassandra-mc.readthedocs.io/en/latest/guides/solids.html

2) About the cross interactions. I am using the same label for the atoms in the mcf file in this section. For example, in n2.mcf the label of N is N_s1, and in co2.mcf, the label of C_s1. Is this wrong? Does Cassandra use different labels from the mcf file?

3) About the chemical potential.

I corrected it in my input files. I used none as described in the manual. Now, there is co2 molecules inside the CNT. However, the number of molecules from cassandra is still not matching my results from LAMMPS

Can you help me?

Carlos

romanielo commented 1 year ago

Hi Carlos,

Let me try to help you. your question

Should I create a fragment file for the cnt? The documention says "Since the solid structure will be rigid, no bond distances, angle parameters, or dihedral parameters are needed in the MCF. The library_setup.py script will not create a fragment library since the MCF lists zero fragments." Link: https://cassandra-mc.readthedocs.io/en/latest/guides/solids.html

I think the best way is creating a new directory with all the files you need. Then run the library_setup.py script for the system that you are going to simulate (3 species). The script is not going to create fragments for the solid. However, he will order the species that you put in you input file. And it will change you mcf in order to correlate them to the same order. Therefore, after you run the library script (remember to enter the pdb in the same order of your input file) if you open the mcf you will see the the atoms will be ordered now by C_s1 N_s2 M_s2 C_s3 and O_s3. Then the interaction parameters must be entered in your input file in this way.

Your comment

About the cross interactions. I am using the same label for the atoms in the mcf file in this section. For example, in n2.mcf the label of N is N_s1, and in co2.mcf, the label of C_s1. Is this wrong? Does Cassandra use different labels from the mcf file?

Because you run the library_setup.py for the binary mixture in the fluid phase. In that case you probabily put N2 as specie 1 and Co2 as specie2. That is why you should create a new directory because now your system has 3 species and not only 2. And in the mcf order you enter you specify cnt specie 1.

Then, please do that (create a new directory, run the library script before run your simulation and tell me your results. Best Lucienne


De: camjjr @.> Enviado: terça-feira, 8 de novembro de 2022 11:13 Para: MaginnGroup/Cassandra @.> Cc: Lucienne Lobato Romanielo @.>; Comment @.> Assunto: Re: [MaginnGroup/Cassandra] Insertion of a huge number of molecules in a GCMC simulation (Issue #136)

Hi Lucienne,

Thank you for taking the time to read my input files. I will enumerate the problems that you mentioned.

  1. Should I create a fragment file for the cnt? The documention says "Since the solid structure will be rigid, no bond distances, angle parameters, or dihedral parameters are needed in the MCF. The library_setup.py script will not create a fragment library since the MCF lists zero fragments." Link: https://cassandra-mc.readthedocs.io/en/latest/guides/solids.html

  2. About the cross interactions. I am using the same label for the atoms in the mcf file in this section. For example, in n2.mcf the label of N is N_s1, and in co2.mcf, the label of C_s1. Is this wrong? Does Cassandra use different labels from the mcf file?

  3. About the chemical potential.

I corrected it in my input files. I used none as described in the manual. Now, there is co2 molecules inside the CNT. However, the number of molecules from cassandra is still not matching my results from LAMMPS

Can you help me?

Carlos

— Reply to this email directly, view it on GitHubhttps://github.com/MaginnGroup/Cassandra/issues/136#issuecomment-1307288059, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEY63FJTY3AHLIVLDTIIHTDWHJN2FANCNFSM6AAAAAARZPLX2E. You are receiving this because you commented.Message ID: @.***>

camjjr commented 1 year ago

Hi Lucienne,

I made a new directory and run the library script before running Cassandra. The results are the same as the previous simulation. However, I noticed the program I used to compare Cassandra's results with those from Lammps had a problem. I corrected it and now the simulations are matching.

Thank you very much,

Carlos

romanielo commented 1 year ago

Hi Carlos,

I am happy that now things are going right. We are also happy for your questions. If I can help with anything more please let me know.

best regards, Lucienne


De: camjjr @.> Enviado: quinta-feira, 10 de novembro de 2022 20:15 Para: MaginnGroup/Cassandra @.> Cc: Lucienne Lobato Romanielo @.>; Comment @.> Assunto: Re: [MaginnGroup/Cassandra] Insertion of a huge number of molecules in a GCMC simulation (Issue #136)

Hi Lucienne,

I made a new directory and run the library script before running Cassandra. The results are the same as the previous simulation. However, I noticed the program I used to compare Cassandra's results with those from Lammps had a problem. I corrected it and now the simulations are matching.

Thank you very much,

Carlos

— Reply to this email directly, view it on GitHubhttps://github.com/MaginnGroup/Cassandra/issues/136#issuecomment-1311029501, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEY63FMSLGIZHTLZM6YUSX3WHV62DANCNFSM6AAAAAARZPLX2E. You are receiving this because you commented.Message ID: @.***>