lano

0 Reputation

0 Badges

11 years, 271 days

MaplePrimes Activity


These are replies submitted by lano

@Carl Love 

I have my own code in C++. It comile and running work OK. But wants know what is the problem of it physically!

I am using Metropolis algorithm to do this simulation.

First Make a chain of polymer (random walk of 200 monomers each postion apart from otheres by 1 units of bond length) and then calculate energy of this chain using Morse Potential function and bond energy.

For different of range temperature I do the following steps;

Second I move randomly one of the monmers randomly by some random number between (1,-1) and multiplying by a max displacement which is in my simulation 0.001 units of bond length. Then calcuate the energy for this new chain. 

Third , compare the energies before and after moving using boltzman contrbuition.

If the new energy is less than the old one accept this chain otherwise make a random number between 0 and 1. if this number is less than the probablity of boltzman then the new energy is now old energy for the next move. otherwise reject this move and start the new movement and repeat the steps.

When MC steps is equliburied (I have done it for 1 milion steps) I have to calculate Radius of gyration for the last chain. Then I have to find the Theta temperature for this chain. 

 

So If you could help me that would be appreciate. And if you want i will send you my code for being sure if you are familiar with MC and C++ programing.

 

Thanks a lot

Page 1 of 1