fraction

hello
i have tried to simulate a system of binary lj particles (kob anderson model)with the ratio of 4:1 & total number of atom was 32000.ratio was set as - set group all type/fraction 2 0.2 23984
but after simulation it was found that ratio is not exact 4:1.it depends on random number seed that is chosen .Is there any way out to get exact ratio?

Yes. It depend on the random number but you can still get the exact fraction with trial and error. You have to try values close to 0.2 (say between 0.189 to 0.221). I had similar experience with type/fraction and found out that 40 percent of atom type A requires a type/fraction argument of 0.389.

To speed up your trial and error procedure, you can run 1 time step of the simulation with fix nve and assign one atom type (say A_atoms to a group) and your log file should tell you how many atoms are in that group. This is what I do. Suppose atom type A is type number 1 and type B is 2. Just add this line after your pair_style command.

group A_atoms type 1

The log file will give you the exact number of atoms that are randomly assigned to type A. You can now tweak your type/fraction argument up and down till you get the exact number/fraction you want. Good luck.

Suleiman,

hello
i have tried to simulate a system of binary lj particles (kob anderson
model)with the ratio of 4:1 & total number of atom was 32000.ratio was set
as - set group all type/fraction 2 0.2 23984
but after simulation it was found that ratio is not exact 4:1.it depends on
random number seed that is chosen .Is there any way out to get exact ratio?

please read the documentation. it says clearly that this approach is not
_meant_ to give an exact fraction.

Keyword type/fraction sets the atom type for a fraction of the
selected atoms. The actual number of atoms changed is not guaranteed
to be exactly the requested fraction, but should be statistically
close. Random numbers are used in such a way that a particular atom is
changed or not changed, regardless of how many processors are being
used.

axel.

Yes. It depend on the random number but you can still get the exact fraction with trial and error. You have to try values close to 0.2 (say between 0.189 to 0.221). I had similar experience with type/fraction and found out that 40 percent of atom type A requires a type/fraction argument of 0.389.

To speed up your trial and error procedure, you can run 1 time step of the simulation with fix nve and assign one atom type (say A_atoms to a group) and your log file should tell you how many atoms are in that group. This is what I do. Suppose atom type A is type number 1 and type B is 2. Just add this line after your pair_style command.

group A_atoms type 1

The log file will give you the exact number of atoms that are randomly assigned to type A. You can now tweak your type/fraction argument up and down till you get the exact number/fraction you want. Good luck.

please note, that from the point of view of statistics,
this is a very bad idea. if you want your system to
_really_ represent a subset of a bulk system with
a _random_ distribution of atom types, then you
_must not_ enforce those to be an exact fraction.
rather, you want to do multiple runs with different
seeds and then use the average of those.

to explain, please consider the following:
assume you have a large chunk of atoms,
say 1,000,000 with a random distribution
of atoms at an exact 0.2 ratio as you desire.
if the distribution of atom types would be
truly random, then at subset of 1,000 atoms
will _not_ have an _exact_ fraction of 0.2,
only the average over all 1,000 subsets
will be at a 0.2 fraction.

thus if you limit the distribution of types
to be of an exact ratio, you are manipulating
your results in an undesirable way.

cheers,
     axel.

Axel,

  Thanks for the enlightenment. I answered the question that was asked primarily because I just work on a similar problem. The solution I suggested should be good enough for what banerjee was looking for.

As for the statistics you mentioned, I don't fully understand what you meant by "true representation of the bulk system". I have 1000 atoms system and want 40 to be type A and 60 to be type B and I was able to do it. What I use it for is another thing entirely. What I know is that for a binary system, the most probable configuration is the one with minimum energy (configuration equilibrium). This is obtain using exchange Monte Carlo or parallel tempering.

I hope this make tthings clear.

Cheers!

Suleiman.

Axel,

Thanks for the enlightenment. I answered the question that was asked primarily because I just work on a similar problem. The solution I suggested should be good enough for what banerjee was looking for.

...or not for exactly the reason that i have given.

As for the statistics you mentioned, I don't fully understand what you meant by "true representation of the bulk system". I

ok. then let's go even more extreme. don't look at subsets of a 1000
atoms, but at subsets of 5 atoms.
should you always get 4 atoms of type 1 and 1 atom of type 2 when
selecting a fraction value of 0.2?
of course not! if you had that, you wouldn't have a random
distribution of the atom type fraction, but
something that is too regular and almost a crystal.

have 1000 atoms system and want 40 to be type A and 60 to be type B and I was able to do it. What I use it for is
another thing entirely. What I know is that for a binary system, the most probable configuration is the one with minimum

that doesn't avoid the _systematic_ statistical error that you are making
by constraining the ratio to be exact. please think about this some more.
either there is a strong enough interaction (e.g. bonds in a molecule) that
enforces the ration, or it will not be exact for a small enough subset. at the
same token, the ratio should be come closer to the desired fraction, the
larger the sample is.

energy (configuration equilibrium). This is obtain using exchange Monte Carlo or parallel tempering.

nope. under almost all conditions, the most probable configuration is _rarely_
the one with the lowest energy. that is elementary statistical
mechanics knowledge.

I hope this make tthings clear.

not really.

axel.

Alright,

If my explanation is not clear enough, I will break it down using a parable of two snake oil salesmen.

Both salesmen were standing in the lobby of a casino slot machines advertising their winning combination to lottery players. One claim to have many numbers that can be ran through many of the slot machines, including the jackpot slot to have a high chance of winning the jackpot. The other salesman want you to run some numbers through the jackpot machine alone to have a shot at winning.

Whether a jackpot is won is a probability. I used the word "probable" for describing the configuration of interest. It doesn't matter if this is based on elementary statistical mechanics or something else.

My understanding of your description is that a sampling over several mole fractions close to the mean with small standard deviation is the legal way to go. My original statement basically meant a sampling over several configuration space for a specific mole fraction will just be sufficient. Doing both will be even better, but may cost more if such calculations are expensive.

For good statistics, sampling over several mole fraction is necessary but not sufficient for most applications. However, for a given mole fraction, sampling over several configuration space at the mole fraction of interest is sufficient.

In the end, the number that comes out is just a number. How good is the number depends on who believe you. After all, it's all probability which is the way of the snake oil salesman!

Suleiman.

Alright,

If my explanation is not clear enough, I will break it down using a parable of two snake oil salesmen.

Both salesmen were standing in the lobby of a casino slot machines advertising their winning combination to lottery players. One claim to have many numbers that can be ran through many of the slot machines, including the jackpot slot to have a high chance of winning the jackpot. The other salesman want you to run some numbers through the jackpot machine alone to have a shot at winning.

Whether a jackpot is won is a probability. I used the word "probable" for describing the configuration of interest. It doesn't matter if this is based on elementary statistical mechanics or something else.

sorry, but you are comparing apples and oranges here.
it *does* make a difference, since the analysis of MD
simulations *depends* on statistical mechanics and
such not a negotiable entity.

thus a probable configuration and desired configuration
do not need to be the same. the probability of a configuration
for a given system is something that can be determined
systematically. what you desire to see is something else,
and cannot be know systematically. i consider it careless
to mix those two things up.

My understanding of your description is that a sampling over several mole fractions close to the mean with small standard deviation is the legal way to go. My original statement basically meant a sampling over several configuration space for a specific mole fraction will just be sufficient. Doing both will be even better, but may cost more if such calculations are expensive.

you are wrong in your understanding. what i am asserting
is that by enforcing a specific ratio you reduce the available
phase space and thus the validity of your results as being
representative for a large sample (we are talking about bulk
systems, right?). running a longer trajectory compared to
having multiple runs cannot make up for that, since the
variance in the fraction is not available to your scenario.

For good statistics, sampling over several mole fraction is necessary but not sufficient for most applications. However, for a given mole fraction, sampling over several configuration space at the mole fraction of interest is sufficient.

In the end, the number that comes out is just a number. How good is the number depends on who believe you. After all, it's all probability which is the way of the snake oil salesman!

i strongly disagree that the validity of your results
is a negotiable property, particularly when there are
well understood concepts that you prefer to to ignore.

however, exactly that makes it apparently impossible
to convince you otherwise, so i'd rather stop here
and can only hope that others won't take your
ex-cathedra declarations not too seriously and
rather look for proper proof that their results
are accurate and verifiable.

axel.

I tried to restrain myself from further argument about this issue, but I cannot sit and accept that THEORETICAL results are non-negotiable. Such statement is tantamount to either being naive or arrogant. It is rather reckless to say this to young and up coming scientist. I have seen ab intio results that are just awful compared to experiments and classical results that comes out close to exact by sheer luck or cancellation of error.

What we do is a simulation of reality and we should not loss focus on some of our shortcomings. I am not interested in showing off my knowledge, but it bothers me when words such as "manipulation of results", "you are wrong" are used you to describe my statements, when all I tried to do is to help someone to answer her/his question.

I will leave the matter here and refrain from further discussion on this issue. I hope the person seeking for answer to her/his problem get the necessary solution.

Suleiman.

I consider myself a young and up coming scientist . My advise is : Get over it and drink a beer =) . And don’t forget to invite me . Sometimes you only have to forget it all and take a time out =) . Then come back and redo work .

A Salute
Oscar G

Guerroro,

Thanks for advise. I am also a young and up coming scientist. I stand to be corrected and will appreciate it when done politely and professionally. I only have problem when such approach is condescending. Do unto others, what you want other to do onto you. Simple enough!

Suleiman