Space constraint

Bounce back condition

class BounceBackConstrain(all_info, group)

The constructor of a bounce back wall object with a group of particles.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of charged particles.

addWall(float o_x, float o_y, float o_z, float d_x, float d_y, float d_z)

add wall with original point(o_x, o_y, o_z) and normal direction(d_x, d_y, d_z).

addCylinder(float o_x, float o_y, float o_z, float d_x, float d_y, float d_z, float r)

add cylinder with original point (o_x, o_y, o_z) , axis direction (d_x, d_y, d_z) and radius.

addSphere(float o_x, float o_y, float o_z, float r)

sphere with center point(o_x, o_y, o_z) and radius.

clcearWall()

clear the walls.

clearCylinder()

clear the cylinders

clearSphere()

clear the spheres.

Example:

bbc = gala.BounceBackConstrain(all_info, group)
bbc.addWall(0.0, 10.0, 0.0, 0.0, 1.0, 0.0)
bbc.addWall(0.0, -10.0, 0.0, 0.0, 1.0, 0.0)
app.add(bbc)

LJ surface force

class LJConstrainForce(all_info, group, r_cut)

The constructor of a LJ interaction surface object for a group of particles.

Parameters:
  • all_info (AllInfo) – The system information.

  • group (ParticleSet) – The group of charged particles.

  • r_cut (float) – The cut-off radius.

setParams(string type, float epsilon, float sigma, float alpha)

sets the interaction parameters of particle type for LJ surface.

addWall(float o_x, float o_y, float o_z, float d_x, float d_y, float d_z)

adds wall with original point(o_x, o_y, o_z) and normal direction(d_x, d_y, d_z)

addCylinder(float o_x, float o_y, float o_z, float d_x, float d_y, float d_z, float r)

adds cylinder with original point(o_x, o_y, o_z) ,axis direction(d_x, d_y, d_z), and radius.

addSphere(float o_x, float o_y, float o_z, float r)

adds sphere with center point(o_x, o_y, o_z) and radius.

clcearWall()

clear the walls.

clearCylinder()

clear the cylinders

clearSphere()

clear the spheres.

Example:

ljc = gala.LJConstrainForce(all_info, group, 1.0)
ljc.addWall(0.0, 10.0, 0.0, 0.0, 1.0, 0.0)
ljc.addWall(0.0, -10.0, 0.0, 0.0, 1.0, 0.0)
ljc.setParams("A", 1.0, 1.0, 1.0)
app.add(ljc)