Table of Contents
- Monte Carlo: Ideal gas Rosenbluth weight butane at 300K
- Monte Carlo: Ideal gas Rosenbluth weight C5-C9 at 573K
- Monte Carlo: Ideal gas Rosenbluth weight C6-isomers at 433K
- Charge-equilibration IRMOF-1
- Grid Interpolation: CO₂ in IRMOF-1
Monte Carlo: Ideal gas Rosenbluth weight butane at 300K
To compare simulation values to experiments a reference state should be chosen. A convenient reference state is the ideal gas. The reference Rosenbluth value can be computed from a simulation of a single chain in an empty box at the desired temperature.
{
"SimulationType" : "MonteCarlo",
"NumberOfCycles" : 100000,
"NumberOfInitializationCycles" : 0,
"PrintEvery" : 5000,
"Systems" : [
{
"Type" : "Box",
"BoxLengths" : [30.0, 30.0, 30.0],
"ExternalTemperature" : 300.0,
"ChargeMethod" : "None"
}
],
"Components" : [
{
"Name" : "butane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
}
]
}
Note that the ideal-gas Rosenbluth weight depends on the temperatures and on the force field.
{
"CriticalTemperature" : 425.125,
"CriticalPressure" : 3796000.0,
"AcentricFactor" : 0.201,
"Type" : "flexible",
"pseudoAtoms" :
[
["CH3", [0.0, 0.0, 0.0]],
["CH2", [0.0, 0.0, 0.0]],
["CH2", [0.0, 0.0, 0.0]],
["CH3", [0.0, 0.0, 0.0]]
],
"Connectivity" : [
[0, 1],
[1, 2],
[2, 3]
],
"Bonds" : [
[["CH3", "CH2"], "HARMONIC", [96500.0, 1.54]],
[["CH2", "CH2"], "HARMONIC", [96500.0, 1.54]]
],
"Bends" : [
[["CH3", "CH2", "CH2"], "HARMONIC", [62500.0, 114]]
],
"Torsions" : [
[["CH3", "CH2", "CH2", "CH3"], "TRAPPE", [0.0, 355.03, -68.19, 791.32]]
]
}
For this butane-model, we obtain at 300K an ideal-gas Rosenbluth weight of \(1.304441\times10^{-1} \pm 1.109380\times10^{-5}\).
Monte Carlo: Ideal gas Rosenbluth weight C5-C9 at 573K
Note that for Rosenbluth weights several chains can be computed simultaneously, since they are computed from Widom insertions where the molecule is never actually inserted in the system.
{
"SimulationType" : "MonteCarlo",
"NumberOfCycles" : 100000,
"NumberOfInitializationCycles" : 0,
"PrintEvery" : 5000,
"ForceField" : ".",
"Systems" : [
{
"Type" : "Box",
"BoxLengths" : [30.0, 30.0, 30.0],
"ExternalTemperature" : 573.0,
"ChargeMethod" : "None"
}
],
"Components" : [
{
"Name" : "pentane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "hexane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "heptane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "octane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "nonane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
}
]
}
Molecule | Rosenbluth weight |
\(n\)-pentane | \(6.393805\times10^{-2} \pm 2.626340\times10^{-5}\) |
\(n\)-hexane | \(1.642211\times10^{-2} \pm 7.127763\times10^{-6}\) |
\(n\)-heptane | \(4.244256\times10^{-3} \pm 1.549234\times10^{-6}\) |
\(n\)-octane | \(1.103900\times10^{-3} \pm 1.057183\times10^{-6}\) |
\(n\)-nonane | \(2.885495\times10^{-4} \pm 2.165096\times10^{-7}\) |
Monte Carlo: Ideal gas Rosenbluth weight C6-isomers at 433K
Similarly, we can obtain the ideal-gas Rosenbluth weights of hexane isomers.
{
"SimulationType" : "MonteCarlo",
"NumberOfCycles" : 100000,
"NumberOfInitializationCycles" : 0,
"PrintEvery" : 5000,
"Systems" : [
{
"Type" : "Box",
"BoxLengths" : [30.0, 30.0, 30.0],
"ExternalTemperature" : 433.0,
"ChargeMethod" : "None"
}
],
"Components" : [
{
"Name" : "hexane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "2-methylpentane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "3-methylpentane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "22-methylbutane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
},
{
"Name" : "23-methylbutane",
"WidomProbability" : 1.0,
"CreateNumberOfMolecules" : 0
}
]
}
Note the ideal-gas Rosenbluth weights can vary a lot, even for isomers.
Molecule | Rosenbluth weight |
hexane | \(8.099334\times10^{-3} \pm 2.104924\times10^{-6}\) |
2-methylpentane | \(3.748358\times10^{-2} \pm 1.275033\times10^{-5}\) |
3-methylpentane | \(5.348429\times10^{-2} \pm 9.390518\times10^{-6}\) |
22-methylbutane | \(1.347700\times10^{-1} \pm 3.608139\times10^{-5}\) |
23-methylbutane | \(5.814672\times10^{-2} \pm 1.823282\times10^{-5}\) |
Charge-equilibration IRMOF-1
TODO: not working yet ([charge equilibration]: no solution found').
{
"SimulationType" : "MonteCarlo",
"NumberOfCycles" : 0,
"NumberOfInitializationCycles" : 0,
"NumberOfEquilibrationCycles" : 0,
"PrintEvery" : 5000,
"Systems" : [
{
"Type" : "Framework",
"Name" : "IRMOF-1",
"NumberOfUnitCells" : [1, 1, 1],
"UseChargesFrom" : "ChargeEquilibration",
"ChargeMethod" : "Ewald",
"ExternalTemperature" : 300.0
}
],
"Components" : [
{
"Name" : "methane",
"TranslationProbability" : 1.0,
"CreateNumberOfMolecules" : 0
}
]
}
Grid Interpolation: CO₂ in IRMOF-1
Some simulations, especially with a large number of unitcells, by using grid-interpolation. Consider a simulation of CO₂, then we can make a pre-computed energy grid for the oxygen and the carbon of the molecule. An additional grid is needed for the electrostatics.
{
"SimulationType" : "MonteCarlo",
"NumberOfCycles" : 100000,
"NumberOfInitializationCycles" : 20000,
"NumberOfEquilibrationCycles" : 50000,
"PrintEvery" : 5000,
"Systems" : [
{
"Type" : "Framework",
"Name" : "IRMOF-1",
"NumberOfUnitCells" : [2, 2, 2],
"ChargeMethod" : "Ewald",
"CutOff" : 12.0,
"ExternalTemperature" : 298.0,
"ExternalPressure" : 1e5
}
],
"Components" : [
{
"Name" : "CO2",
"ThermodynamicIntegration" : true,
"TranslationProbability" : 0.5,
"RotationProbability" : 0.5,
"ReinsertionProbability" : 0.5,
"CFCMC_CBMC_SwapProbability" : 1.0,
"CreateNumberOfMolecules" : 0
}
]
}
In the force_field.json
we can set additional options to switch on the use of grid-interpolation.
{
"UseInterpolationGrids" : ["C_co2", "O_co2"],
"SpacingVDWGrid" : 0.15,
"SpacingCoulombGrid" : 0.15,
"NumberOfGridTestPoints" : 100000,
"InterpolationScheme" : 3
}
InterpolationScheme 1 is capable of interpolating only energies, InterpolationScheme 3 interpolates the energies and the forces, while InterpolationScheme 5 interpolates energies, forces, and the Hessian.
For each listed (pseudo-)atom, a grid will be made at the start of the simulation.
Generating an Ewald Real interpolation grid (172x172x172) for a unit charge
===============================================================================
(Using 1 1 1 periodic cells to create grid)
Percentage finished: 1
Percentage finished: 2
Percentage finished: 3
....
Percentage finished: 99
Percentage finished: 100
Grid done... ( 20.537806 [s])
Generating an VDW interpolation grid (172x172x172) for C_co2
===============================================================================
(Using 1 1 1 periodic cells to create grid)
Percentage finished: 1
Percentage finished: 2
Percentage finished: 3
....
Percentage finished: 99
Percentage finished: 100
Grid done... ( 6.685936 [s])
After grid creation, the grids are tested with random insertions
Testing VDW interpolation grid (172x172x172) for C_co2
-------------------------------------------------------------------------------
(Using 100000 points for testing)
Boltzmann average energy VDW (table): -214.02840045285805
Boltzmann average energy VDW (full): -214.01140960167118
Boltzmann relative error: 0.00021947314459359044
Boltzmann average gradient(x) VDW (table): 3.712850362496449
Boltzmann average gradient(x) VDW (full): 3.713806990998235
Boltzmann relative error: 0.002155151736540394
Boltzmann average gradient(y) VDW (table): 0.8850842781059334
Boltzmann average gradient(y) VDW (full): 0.8857628567145862
Boltzmann relative error: 0.002131945045696959
Boltzmann average gradient(z) VDW (table): 0.6725652417255391
Boltzmann average gradient(z) VDW (full): 0.671549051697825
Boltzmann relative error: 0.0020873926276597484
Testing Coulomb interpolation grid (172x172x172) for C_co2
-------------------------------------------------------------------------------
(Using 100000 points for testing)
Boltzmann average energy Real Ewald (table): -192.95353813520873
Boltzmann average energy Real Ewald (full): -192.95384459189873
Boltzmann relative error: 5.643361809478482e-05
Boltzmann average gradient(x) Real Ewald (table): -1.115591762633454
Boltzmann average gradient(x) Real Ewald (full): -1.1181301909005674
Boltzmann relative error: 0.0009199018730806105
Boltzmann average gradient(y) Real Ewald (table): 2.994373232849875
Boltzmann average gradient(y) Real Ewald (full): 2.994950182057741
Boltzmann relative error: 0.000927688382477166
Boltzmann average gradient(z) Real Ewald (table): 5.0800230953098415
Boltzmann average gradient(z) Real Ewald (full): 5.0797601170886315
Boltzmann relative error: 0.0009238132876741674
Note that grids also work with the CFCMC techniques. Here, the fractional molecules are computed using full energy evaluations, while the energies of all integer molecule are interpolated.