In [1]:
from deplete.segm import *
from deplete.colloids import *
from deplete.curve import Curve

# Triangular colloids

In [2]:
triangloid(1.4).draw(label="Circle")
triangloid(1.3, 1).draw(label="Arcs")
triangloid(1, 1, 0.1, 0.2).draw(label="Convex")
triangloid(0.8, 1, 0.1, -0.3).draw(label="Concave")
legend();
axis('equal');

# Basics

  • axis('equal'); will give a 1:1 scaling
  • .draw() will draw the curve, with matplotlib arguments
  • .offset() will offset/etch a colloid by a positive/negative offset argument
  • .shift() will move a curve
  • .rotate() will rotate curve about the origin
  • .area() will compute area of colloid
In [3]:
c=triangloid(1, 1, 0.2, -0.3)
c.draw(label='Colloid')
c.shift([2,-1]).draw(label='Shifted')
c.rotate(pi/3).draw(label='Rotated')
c.offset(0.1).draw('--', label='Offset')
c.offset(-0.1).draw('--', label='Etched')
legend();
axis('equal');
print("The area of colloid is {}".format(c.area()))
The area of colloid is 2.483660510623751

# Interaction between colloids

  • The depletion potential is determined by intersection of offset boundaries
  • show_colloids() will visualize the interaction between colloids
In [4]:
c1=triangloid(1,0.5,0.2,0.4).rotate(pi/6)
c2=triangloid(1,0.5,0.2,-0.4).rotate(-pi/6).shift([2.2, 0])
show_colloids(c1, c2, 0.15, inter=True)

# Dart-shaped colloids

In [5]:
dartoid(0, 0.2).draw(label="Round")
dartoid(1, 0.2).shift([2,-2]).draw(label="Sharp")
dartoid(1, 0.4).shift([0,-2.1]).draw(label="Deep")
#dartoid(1, 1).draw(label="Convex")
#dartoid(0.8, 1).draw(label="Concave")
legend();
axis('equal');
In [6]:
c1=dartoid(0, 2-sqrt(3)).rotate(pi/6)
c2=c1.shift([2, 0.07])
show_colloids(c1, c2, 0.15, inter=True)
In [7]:
binding_energy(c1, c2, 0.15)
Out[7]:
0.14404994841823626

Comments

comments powered by Disqus