GCMC

Isaak Daniels isaakdan... at gmail.com
Sat Oct 1 05:21:29 UTC 2011


Thank you

Wish me luck

On Sep 30, 11:57 pm, Matt McGrath <obfis... at gmail.com> wrote:
> CP2K has a pretty consistent naming scheme.  Usually, routines related
> to a particular topic begin with TOPIC_.  In this case, the Monte
> Carlo ensemble routines are in mc_ensembles.F.  From there you should
> be able to figure out how the move types are selected (the definition
> of an ensemble is just the selection of different move types).
>
>                           Cheers, Matt
>
> On Oct 1, 3:02 am, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
>
>
>
>
>
>
> > I think I will try to implement GCMC into the source code. What files
> > should one modify if one wants to introduce a new ensamble?
>
> > Thank you
>
> > On Sep 3, 12:56 am, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > Hi.
>
> > > That's not possible.  The more molecules you have, the less the
> > > density will change, but it will always change by a little.
>
> > >                                            Cheers, Matt
>
> > > On Sep 3, 4:24 am, Isaak Daniels <isaakdan... at gmail.com> wrote:
>
> > > > How does one make sure the density isn't changed in the vapor box when
> > > > one moves a molecule out of it?
>
> > > > Thank you
>
> > > > On Aug 30, 11:21 pm, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > > The chemical potential of an ideal gas is a function of the
> > > > > temperature and number density (N/V).  So, if you have a chemical
> > > > > potential you want at a certain temperature, you can solve that
> > > > > equation for the number density.  Once you have the number density,
> > > > > you decide how many vapor molecules you want (400, 500 maybe) and
> > > > > calculate the vapor box volume from that.  Then you run the simulation
> > > > > and make sure the vapor density does not change over the course of the
> > > > > simulation, because if it does, your chemical potential changes as
> > > > > well.
>
> > > > >                              Cheers, Matt
>
> > > > > On Aug 31, 12:14 am, Isaak Daniels <isaakdan... at gmail.com>
> > > > > wrote:
>
> > > > > > What variables should one vary to affect the chemical potential?
>
> > > > > > Thank you
>
> > > > > > On Aug 30, 2:41 am, Matt McGrath <obfis... at gmail.com> wrote:
>
> > > > > > > Nope, not possible.  I never saw a reason for having such a feature
> > > > > > > (zero particles in the Gibbs ensemble vapor box is still a valid
> > > > > > > configuration).
>
> > > > > > >                                 Cheers, Matt
>
> > > > > > > On Aug 30, 12:51 am, Isaak Daniels <isaakdan... at gmail.com>
> > > > > > > wrote:
>
> > > > > > > > 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,
>
> ...
>
> read more »


More information about the CP2K-user mailing list