GCMC
Isaak Daniels
isaakdan... at gmail.com
Mon Aug 29 15:51:26 UTC 2011
Thank you. Is there a way to stop the program from aborting when there
are no molecules left in one box?
Thank you
On Aug 29, 12:44 am, Matt McGrath <obfis... at gmail.com> wrote:
> Hi Issak. Neither of those is possible at the moment. The only
> option is to write a script to generate the coordinates yourself (for
> example, creating a grid inside a box the size of your desired
> simulation box, and putting a molecule on each gridpoint, and then
> using those coordinates as the input to one of the boxes in CP2K). If
> you are using an ideal gas box (i.e. all the FIST interactions are set
> to zero), you don't have to equilibrate the coordinates at all, which
> is a small help. Otherwise you should run some short equilibration
> (not letting the molecules swap) before doing a real run.
>
> Cheers, Matt
>
> On Aug 29, 2:36 am, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
>
>
> > Also, how do you do it so that one can specify a number of molecules
> > without needing coordinates?
>
> > Thank you for helping me.
>
> > On Aug 28, 11:06 am, Isaak Daniels <isaakdan... at gmail.com>
> > wrote:
>
> > > Just to confirm, there is no way to directly have an initial number of
> > > molecules set that can be changed, for example doing 400 gas molecules
> > > that can go in and out of boxes?
>
> > > Thank you
>
> > > On Aug 28, 12:46 am, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > Hi Issak. You can find the average number of molecules in each box by
> > > > writing a script to average the mc_molecules file that is printed
> > > > out. The format is
>
> > > > Step number # of molecules of type 1 # of molecules of type
> > > > 2 ..... etc, for box 1
> > > > Step number # of molecules of type 1 # of molecules of type
> > > > 2 ..... etc, for box 2 (if there is a second box in the system)
>
> > > > At one time this was printed out at the end of a run, but for some
> > > > reason I removed it. There is no way to set this number via the
> > > > pressure...you just need to change the box volume, run the simulation,
> > > > see what the average density is (assuming the simulation has
> > > > equilibrated), change the box volume so that average density will give
> > > > the desired number of molecules, and then rerun. If the number of
> > > > molecules in the box is very small, there will be large fluctuations
> > > > around this number over the course of the run, but assuming the
> > > > simulation is long enough and equilibrated, the average should be what
> > > > you desire.
>
> > > > The easiest way of keeping a large molecule rigid is to change the
> > > > _MOL probabilities in the input file. For example, if the big
> > > > molecule is type 1 and the gas atoms are type 2, then a line of
>
> > > > PMSWAP_MOL 0.0 1.0
>
> > > > will let the gas molecules swap between boxes but not the big
> > > > molecule. Similarly,
>
> > > > PMTRAION_MOL 0.0 1.0
>
> > > > will attempt to change the conformation of molecule 2 but not molecule
> > > > 1. If you want 30% of molecule translations to be done on molecule 1
> > > > and 70% on molecule 2, a line like
>
> > > > PMTRANS_MOL 0.3 1.0
>
> > > > would work. Hope that clarifies things. The file, tests/MC/regtest/
> > > > GEMC_NVT_box1.inp uses this, since it has two molecule types.
>
> > > > Cheers, Matt
>
> > > > On Aug 27, 6:26 am, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
> > > > > Sorry for not being clear. By crystal, I mean a large molecule I want
> > > > > rigid, and when I say atoms, I meant the gas atoms.
>
> > > > > Thank you
>
> > > > > On Aug 26, 4:10 pm, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
> > > > > > Also, how does one make sure the crystal is rigid but the atoms can go
> > > > > > in and out of each box?
>
> > > > > > Thank you for answering my questions
>
> > > > > > On Aug 26, 3:07 pm, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
> > > > > > > And one would set it by using the Pressure?
>
> > > > > > > Thank you
>
> > > > > > > On Aug 26, 11:12 am, Isaak Daniels <isaakdan... at gmail.com>
> > > > > > > wrote:
>
> > > > > > > > Is there a way to find the average number of molecules in each box for
> > > > > > > > a GEMC simulation?
>
> > > > > > > > Thank you
>
> > > > > > > > On Aug 25, 2:23 am, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > > > > > > The only way to set thechemical potentialis if you use the above
> > > > > > > > > tricks and they work. You can't set it directly, but you could choose
> > > > > > > > > your ideal gas to have a certainchemical potential. GEMC would
> > > > > > > > > equilibrate thechemical potentialbetween the two boxes, and provided
> > > > > > > > > your ideal vapor box is big enough (i.e. a true reservoir), its
> > > > > > > > >chemical potentialwould not change, so therefore thechemical> potentialin both boxes would be (approximately) the same as what you
> > > > > > > > > started with for your ideal gas. Finding what is "big enough" would
> > > > > > > > > probably take some effort, though, and there would be error bars
> > > > > > > > > associated with the number, so this is not a perfect solution.
>
> > > > > > > > > Cheers, Matt
>
> > > > > > > > > On Aug 24, 9:21 pm, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
> > > > > > > > > > Is there a way to set achemical potential, such as -454?
>
> > > > > > > > > > Thank you
>
> > > > > > > > > > On Aug 23, 10:08 pm, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > > > > > > > > When you say "import coordinates of a crystal", do you mean as a swap
> > > > > > > > > > > move? As in, you want to have gas molecules and crystal molecules
> > > > > > > > > > > come into the box, or that you put crystal coordinates into the box at
> > > > > > > > > > > the beginning, treat the whole box as QM, and then swap gas molecules
> > > > > > > > > > > into the box (also treated as QM)? The latter option should be
> > > > > > > > > > > possible if the test I described above worked (since the force_env of
> > > > > > > > > > > each box can be specified separately), and is what I assumed you
> > > > > > > > > > > wanted to do in the first post. If you also want to swap in crystal
> > > > > > > > > > > nuclei, you could do that by making it a new molecule type (and
> > > > > > > > > > > creating a psf file for it), but then it would swap into the QM box in
> > > > > > > > > > > a completely random position, and would still be treated as a molecule
> > > > > > > > > > > from CP2K's standpoint (rotated and translated together). I don't
> > > > > > > > > > > know if that's what you want or not.
>
> > > > > > > > > > > Cheers, Matt
>
> > > > > > > > > > > On Aug 23, 9:23 pm, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
> > > > > > > > > > > > Can I also have it so that in the non-vapor box, gas molecules can
> > > > > > > > > > > > enter that box and one can also import coordinates of a crystal, with
> > > > > > > > > > > > this box having QM?
>
> > > > > > > > > > > > Thank you
>
> > > > > > > > > > > > On Aug 23, 3:21 am, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > > > > > > > > > > Hmm. I was thinking about that, and I didn't think it would work
> > > > > > > > > > > > > before I responded to your original question. But now, I'm not so
> > > > > > > > > > > > > sure. If you set all the MM interactions in the vapor box to have
> > > > > > > > > > > > > epsilon=0 and no charges (so you don't need Ewald sums), then you have
> > > > > > > > > > > > > an ideal gas, so...maybe.
>
> > > > > > > > > > > > > A quick way to check would be to try it with MM in both boxes, but set
> > > > > > > > > > > > > all the LJ parameters and charges equal to zero in the vapor box.
> > > > > > > > > > > > > Choose it to be large enough that the density doesn't really change
> > > > > > > > > > > > > over the course of the simulation, don't do any molecule displacements
> > > > > > > > > > > > > in the vapor box, and compare it againstGCMCwith a different code.
> > > > > > > > > > > > > One concern I have is that, on swap moves, the code is going to check
> > > > > > > > > > > > > for overlaps in the vapor box, which it should do for trueGCMC. If
> > > > > > > > > > > > > you try this test and get an answer that is close, and you feel
> > > > > > > > > > > > > comfortable changing the source code, I can let you know which lines
> > > > > > > > > > > > > to change to remove those checks so we can see if it works. I know of
> > > > > > > > > > > > > codes that doGCMCas basically GEMC with a box that has no
> > > > > > > > > > > > > interactions in it (and is big...500 molecules or more), so this
> > > > > > > > > > > > > doesn't seem so different.
>
> > > > > > > > > > > > > Cheers, Matt
>
> > > > > > > > > > > > > On Aug 22, 10:57 pm, Isaak Daniels <isaakdan... at gmail.com>
> > > > > > > > > > > > > wrote:
>
> > > > > > > > > > > > > > Can one do it so that the box not of interest (representing the
> > > > > > > > > > > > > > environment) is MM while the other is done with QM, so one can avoid
> > > > > > > > > > > > > > the pitfalls of enlarging the box?
>
> > > > > > > > > > > > > > Thank you
>
> > > > > > > > > > > > > > On Aug 21, 7:42 pm, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > > > > > > > > > > > > Hi Isaak. Unfortunately, this isn't really possible at the moment,
> > > > > > > > > > > > > > > unless you do Gibbs ensemble Monte Carlo and make the second box huge,
> > > > > > > > > > > > > > > i.e. essentially a reservoir. Of course, if you're using any grid-
> > > > > > > > > > > > > > > based method to compute the energy (Quickstep, Ewald) this adds a
> > > > > > > > > > > > > > > whole lot of expense to the simulation as well, and probably isn't
> > > > > > > > > > > > > > > worth it.
>
> > > > > > > > > > > > > > >GCMChas been in the pipeline for a while (there have been issues with
> > > > > > > > > > > > > > > the choice of reference state
>
> ...
>
> read more »
More information about the CP2K-user
mailing list