Docsity

Introduction-Computational Physics-Lecture Slides, Slides of Computational Physics

Partial preview of the text

Download Introduction-Computational Physics-Lecture Slides and more Slides Computational Physics in PDF only on Docsity!

Introduction

  • Polymers
    • Macromolecules
      • very large
      • thousands, sometimes even millions of times larger than a single water molecule
      • can be seen under an electron microscope
  • Nature of Polymers
    • Made up of long chains of “monomer” units
      • Connected by bonds
    • Example
      • DNA and RNA
        • nucleotides
      • Protein
        • Amino acids
      • Polyethylene
        • CH 2

Properties of Polymers

• Hydrophobic

  • The attraction between monomers is stronger than their

attraction to the molecules of the surrounding solvent, e.g.,

water

• Hydrophilic

  • The attraction between monomers is weaker than their

attraction to the molecules of the surrounding solvent, e.g.,

water

• Non Self-intersect

  • No two monomers can occupy the same place
    • excluded volume

Abstraction of Polymer

  • Real Polymer
    • the monomers occupy positions in continuous space
    • bonds btw. monomers are constrained to have only certain angles
      • depending on the nature of the monomers
  • Simplification
    • Embed the polymer into discrete space
    • Require that the monomers exist at integer coordinates
      • only a lattice spacing apart

Radius

  • Average size of a polymer containing n monomers
  • Radius of gyration
    • average distance of a monomer from the polymer’s center of

mass

  • <Rn^2 > ~ Anv
    • v is the critical exponent
      • in the swollen phase: v  0.
      • in the collapse phase: v=1/
    • A is unknown
      • use linear regression

N = 200; imax = 100; jmax = 2; nframes = 20; % number of frames for movie rand('state', 0) % initialize i = 50; for kk = 1: 1000 rr = rand; if((rr >= 0 ) & ( rr < 0.5) ) i = i + 1; elseif((rr >= 0.5 ) & ( rr < 1.0) ) i = i - 1; end if i >= imax break end if i <= 1 break end plot(kk, i, 'r:.'); hold on F(kk) = getframe; kk end

Program: One- Dimensional Random Walk

Result: One- Dimensional Random Walk

Here we started with ith position = 50 for a grid of 100 mesh points and as a function of MC steps we see above the random walk.

Program: One- Dimensional Random Walk

Here r(rms) is the average (root-mean-squared) step size. Notice that that the same result obtains for a three-dimensional walk. According to above equation, even though the total distance walked after N steps is Nr(rms), on average, the radial distance from the starting point is only sqrt(N) x r(rms).

When walk is random, the particle is equally likely to in any direction in each step. On average, for a large number of random steps, all the cross terms will vanish and we will be left with

A Random Walk

Simple Unbiased Random Walk

For simple,random walks(RW) the walker may cross the walk an infinite number of times with no cost. In d dimensions the end-to-end distance diverges with the number of steps N according to

A simulation of the simple random walk can be carried out by picking a starting point and generating a random number to determine the direction of each subsequent, additional step. After each step the end-to-end distance is computed.

The result is like above figure.

ASSESSMENT: DIFFERENT RANDOM WALKERS

A Picture is Worth a Thousand Words

2D Walk^ 3D Walk

Self-avoiding walks

After each step has been added, a random number is used to decide

between the different possible choices for the next step. If the new

site is one which already contains a portion of the walk, the process is

terminated at the Nth step.

The most simple minded approach to the analysis of the data is to

simply make a plot of log<R^2 (N)> vs log N and to calculate v from

the slope.

If corrections to scaling are present, the behavior of the data may

become quite subtle and a more sophisticated approach is needed.

The results can instead be analyzed using traditional 'ratio methods‘.

Examples of different kinds of random walks (RW) on a square lattice.

For the ordinary unbaised RW every possible new step has the same

probability. For the self-avoiding walks (SAW) the walk dies if it

touches itself.

Self-avoiding walks (SAW)

X

Random Walk Self-Avoiding Walk

Self-avoiding Random Walk

  • Self-avoiding Random Walk
    • Walk on 2D or 3D lattice
    • Explore the geometric properties of linear polymers in good solvent
    • Constraint random walk (don’t allow to go backward)
    • Introduced by Orr
  • Analysis of Self-avoiding Random Walks
    • At first glance, the model is far too simple
    • Phenomenon of universality
      • Many quantities are not dependent on the specific details of the system
      • They are determined only by its universality class
      • All systems in the same universality class share the same dominant asymptotic behavior

Self-avoiding Random

Walk Algorithm

#include <iostream.h> #include <stdlib.h> #include <math.h>

void do_walk (int maxstep, int& nstep, double& rsquared ){ const int MAXSTEP=20; int map[ MAXSTEP2][MAXSTEP2]={0};**

*// start point int completed=0; int x = MAXSTEP; int y = MAXSTEP; int npoint = 1; map[x][y] = npoint; do { int xnew=x; int ynew=y; switch ( (int)( (double)rand()/(RAND_MAX+1.0)) ) { case 0: xnew-= 1; break; case 1: xnew+= 1; break; case 2: ynew-= 1; break; case 3: ynew+= 1; break; } if ( map[xnew][ynew] == 0 ){ npoint++; map[xnew][ynew] = npoint; x = xnew; y = ynew; if ( npoint == maxstep+1 )completed=1; } else if ( map[xnew][ynew] != npoint-1 ) { completed=1; } } while ( !completed );

// Print window centred on map for ( int i=5; i<2MAXSTEP-5; i++ ){ for ( int j=5; j < 2MAXSTEP-5; j++ ){ cout.width(3); cout << map[i][j]; } cout << endl; } nstep = npoint-1; rsquared = pow( x-MAXSTEP,2.0) + pow( y- MAXSTEP, 2.0 ); } int main(){ int maxstep=20,nstep; double rsquared; srand(987654321); for (int i=1; i<10; i++ ){ do_walk(maxstep,nstep,rsquared); cout << endl << "Nsteps: " <<nstep << " Rsquared: " <<rsquared<<endl; } return 0; }**

docsity.com