- Community
- Main Forum
- Cassandra Software
- Inconsistency between Lammps, GOMC, and and Cassandra at High Densities
Inconsistency between Lammps, GOMC, and and Cassandra at High Densities
- mostafa.razavi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 1
7 years 5 months ago #253
by mostafa.razavi
Hi everyone,
1. I have performed three sets of NVT simulations in LAMMPS, GOMC, and Cassandra. My system contains 300 molecules of n-butane at 510K and TraPPE-UA force field was used for all simulations. The densities range from 0.1 gcc to 0.65 gcc.
At low densities, pressures seem to match perfectly, but at high densities, there is a significant difference between pressures computed by these three codes. Cassandra is further away from LAMMPS than GOMC. I have been communicating with GOMC people and I've made sure that my simulations are correct, and we decided that the inconsistency between GOMC and LAMMPS might be due to the fact that GOMC still lacks regrowth move. Since I'm new to Cassandra, I would like to make sure that I have done the simulations correctly, and there is no technical mistakes in my input files, even though I have used the sample simulations to make my input files. Attached is one of my simulations at rho=0.662 gcc and T=510K, along with a plot of three isotherms simulated by Lammps, GOMC and Cassandra.
I also have these a few other related questions that I couldn't find an answer for in the documentation:
2. Does Energy_LJ include both intermolecular and intramolecular LJ interactions, or only intermolecular?
3. Does Cassandra neglect 1-4 bonded LJ interactions by default? I did not specify anything for Intra_Scale section and Cassandra didn't compain, so I'm assuming it must have a default value.
Thank you,
-Mostafa Razavi
1. I have performed three sets of NVT simulations in LAMMPS, GOMC, and Cassandra. My system contains 300 molecules of n-butane at 510K and TraPPE-UA force field was used for all simulations. The densities range from 0.1 gcc to 0.65 gcc.
At low densities, pressures seem to match perfectly, but at high densities, there is a significant difference between pressures computed by these three codes. Cassandra is further away from LAMMPS than GOMC. I have been communicating with GOMC people and I've made sure that my simulations are correct, and we decided that the inconsistency between GOMC and LAMMPS might be due to the fact that GOMC still lacks regrowth move. Since I'm new to Cassandra, I would like to make sure that I have done the simulations correctly, and there is no technical mistakes in my input files, even though I have used the sample simulations to make my input files. Attached is one of my simulations at rho=0.662 gcc and T=510K, along with a plot of three isotherms simulated by Lammps, GOMC and Cassandra.
I also have these a few other related questions that I couldn't find an answer for in the documentation:
2. Does Energy_LJ include both intermolecular and intramolecular LJ interactions, or only intermolecular?
3. Does Cassandra neglect 1-4 bonded LJ interactions by default? I did not specify anything for Intra_Scale section and Cassandra didn't compain, so I'm assuming it must have a default value.
Thank you,
-Mostafa Razavi
Please Log in to join the conversation.
- ryangmullen
- Offline
- Administrator
Less
More
- Posts: 124
- Karma: 4
- Thank you received: 24
7 years 5 months ago - 7 years 5 months ago #254
by ryangmullen
Hi Mostafa,
1) What pressures were you getting? I ran a comparison at the conditions you attached with GROMACS and with my own Cassandra run, and computed the following pressures inatm bar:
Gromacs: 2755 +/- 304 (st dev)
Cassandra: 2727 +/- 221 (st dev)
2) Energy_LJ is the total Lennard-Jones energy for the system, intra- and inter-molecular.
3) Your output log file shows the defaults that were used in your simulation:
Section "# Intra_Scaling" missing from mcf, will look in input file
Section "# Intra_Scaling" is missing from the input file
By default, 1-4 interactions are scaled by 0.5 for all species
1-4 interactions should be excluded for the TraPPE force field (scaled by 0.0). You can accomplish this by adding the following lines to c4.mcf
# Intra_Scaling
0. 0. 0. 1.
0. 0. 0. 1.
Also, your maximum translation (1.0 Angstrom) is high, such that your acceptance of translation moves is low (~11%). If you change the run type from "production" to "equilibration" the max displacement will be automatically adjusted to give you 50% acceptance. When I did this, I got a max displacment of ~0.3 Angstroms.
And I'd recommend changing the charge style to "none". Since TraPPE alkanes have no partial charges, there's no point in computing electrostatics.
Ryan
1) What pressures were you getting? I ran a comparison at the conditions you attached with GROMACS and with my own Cassandra run, and computed the following pressures in
Gromacs: 2755 +/- 304 (st dev)
Cassandra: 2727 +/- 221 (st dev)
2) Energy_LJ is the total Lennard-Jones energy for the system, intra- and inter-molecular.
3) Your output log file shows the defaults that were used in your simulation:
Section "# Intra_Scaling" missing from mcf, will look in input file
Section "# Intra_Scaling" is missing from the input file
By default, 1-4 interactions are scaled by 0.5 for all species
1-4 interactions should be excluded for the TraPPE force field (scaled by 0.0). You can accomplish this by adding the following lines to c4.mcf
# Intra_Scaling
0. 0. 0. 1.
0. 0. 0. 1.
Also, your maximum translation (1.0 Angstrom) is high, such that your acceptance of translation moves is low (~11%). If you change the run type from "production" to "equilibration" the max displacement will be automatically adjusted to give you 50% acceptance. When I did this, I got a max displacment of ~0.3 Angstroms.
And I'd recommend changing the charge style to "none". Since TraPPE alkanes have no partial charges, there's no point in computing electrostatics.
Ryan
Last Edit: 7 years 5 months ago by ryangmullen. Reason: wrong units
Please Log in to join the conversation.
- mostafa.razavi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 1
7 years 5 months ago #255
by mostafa.razavi
Hi Ryan,
Thank you for your helpful response.
1- Following are the pressures in atm that I computed. You can also see the attached plot for a comparison:
LAMMPS: 2671 +/- 24
Cassandra: 2742 +/- 214
GOMC: 2695 +/- 80
Your results:
Gromacs: 2755 +/- 304
Cassandra: 2727 +/- 221
I run Cassandra simulations for 90000 sweeps and started averaging after 30000 sweeps.
There is a big difference between my LAMMPS and your Gromcs results. I used everything according on TraPPE except I have harmonic bond (E=K*(r-r0)^2) and K=191.75 kcal/mol/A^2. What was you Kbond value? Can you send me your Gromacs files so I can compare with mine?
3- I actually did try the following
# Intra_Scaling
0. 0. 0. 1.
0. 0. 0. 1.
However, the results were identical to when I used default values. Do you know why? I think I will double check though.
Thanks,
-Mostafa
Thank you for your helpful response.
1- Following are the pressures in atm that I computed. You can also see the attached plot for a comparison:
LAMMPS: 2671 +/- 24
Cassandra: 2742 +/- 214
GOMC: 2695 +/- 80
Your results:
Gromacs: 2755 +/- 304
Cassandra: 2727 +/- 221
I run Cassandra simulations for 90000 sweeps and started averaging after 30000 sweeps.
There is a big difference between my LAMMPS and your Gromcs results. I used everything according on TraPPE except I have harmonic bond (E=K*(r-r0)^2) and K=191.75 kcal/mol/A^2. What was you Kbond value? Can you send me your Gromacs files so I can compare with mine?
3- I actually did try the following
# Intra_Scaling
0. 0. 0. 1.
0. 0. 0. 1.
However, the results were identical to when I used default values. Do you know why? I think I will double check though.
Thanks,
-Mostafa
Please Log in to join the conversation.
- ryangmullen
- Offline
- Administrator
Less
More
- Posts: 124
- Karma: 4
- Thank you received: 24
7 years 5 months ago #257
by ryangmullen
1 - I mistakenly identified my pressures as atm, when in fact Cassandra and Gromacs output in bar. LAMMPS outputs atm. Not sure about GOMC. That might bring all our data into agreement.
The uncertainties I reported are the standard deviation in the instantaneous values, which should be O(100-1000) bar in a liquid. Are the +/- numbers you reported errors in the mean (which approach 0 for long sims)?
I used LINCS to keep the bonds rigid in Gromacs, so I didn't use a harmonic force constant.
3 - In Cassandra, the pressure is computed in two parts: an ideal gas component + excess pressure component. The former depends on the number of molecules, volume and temperature. The latter depends on the intermolecular virial. Since the intra_scaling only effects intramolecular energies, changing it won't change your pressure much for butane, which only has a single 1-4 interaction per molecule. But it should change your energies. Check out the intramolecular LJ component of the energy in the log file. When 1-4 scaling is 0., the the intramolecular LJ will also be 0 (for butane).
The uncertainties I reported are the standard deviation in the instantaneous values, which should be O(100-1000) bar in a liquid. Are the +/- numbers you reported errors in the mean (which approach 0 for long sims)?
I used LINCS to keep the bonds rigid in Gromacs, so I didn't use a harmonic force constant.
3 - In Cassandra, the pressure is computed in two parts: an ideal gas component + excess pressure component. The former depends on the number of molecules, volume and temperature. The latter depends on the intermolecular virial. Since the intra_scaling only effects intramolecular energies, changing it won't change your pressure much for butane, which only has a single 1-4 interaction per molecule. But it should change your energies. Check out the intramolecular LJ component of the energy in the log file. When 1-4 scaling is 0., the the intramolecular LJ will also be 0 (for butane).
Please Log in to join the conversation.
- mostafa.razavi
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 1
7 years 5 months ago #259
by mostafa.razavi
OK now it makes more sense. Your Cassandra results (energy-lj and pressure) matches GOMC perfectly. My Cassandra results got closer when I excluded 1-4 interactions (I had missed the underscore in Intra_Scaling, so Cassandra did not see it and ironically did not give me error) and chose "equilibration 1100" for my Run_Type 1-4, but is still a little off. I wonder what I am missing in my input files. Could you send me your Cassandra simulation files at 510K and 0.662 gcc, or could you please compare my attached most recent Cassandra files with yours?
FYI: I have a hard time uploading files in here. I have to zip everything and it shouldn't exceed 0.1MB. That's why I couldn't attach the log file. I can email you though.
Regarding the uncertainties, I took the average of the values reported in nvt.out.prp after 30000 sweeps and calculated the standard deviations for them. Same goes for GOMC. In LAMMPS I took the average of instantaneous values.
I know it's a long shot, but is there any chance you could repeat your Gromacs simulation using harmonic bond (E=K*(r-r0)^2) and K=191.75 kcal/mol/A^2? We are studying the performance of MC vs MD in vapor pressure calculations and your help would be very much appreciated.
Thank you
-Mostafa
FYI: I have a hard time uploading files in here. I have to zip everything and it shouldn't exceed 0.1MB. That's why I couldn't attach the log file. I can email you though.
Regarding the uncertainties, I took the average of the values reported in nvt.out.prp after 30000 sweeps and calculated the standard deviations for them. Same goes for GOMC. In LAMMPS I took the average of instantaneous values.
I know it's a long shot, but is there any chance you could repeat your Gromacs simulation using harmonic bond (E=K*(r-r0)^2) and K=191.75 kcal/mol/A^2? We are studying the performance of MC vs MD in vapor pressure calculations and your help would be very much appreciated.
Thank you
-Mostafa
Please Log in to join the conversation.
- ryangmullen
- Offline
- Administrator
Less
More
- Posts: 124
- Karma: 4
- Thank you received: 24
7 years 5 months ago #260
by ryangmullen
Thanks for pointing out the restrictions on file attachments. I'll look into getting those changed.
I've attached my input scripts for both Cassandra and GROMACS. Note that I use non-standard file names in the Cassandra input file for the mcf and fragment files.
Cheers,
Ryan
I've attached my input scripts for both Cassandra and GROMACS. Note that I use non-standard file names in the Cassandra input file for the mcf and fragment files.
Cheers,
Ryan
Please Log in to join the conversation.
- Community
- Main Forum
- Cassandra Software
- Inconsistency between Lammps, GOMC, and and Cassandra at High Densities
Time to create page: 0.933 seconds