Polymerization

Polymerization model

class Polymerization(all_info, nlist, r_cut, seed)

The constructor of an object of polymerization.

Parameters:
  • all_info (AllInfo) – The system information.
  • nlist (NeighborList) – The neighbor list.
  • r_cut (float) – The cut-off radius.
  • seed (int) – The seed of random number generator.
class Polymerization(all_info, type, percent, nlist, r_cut, seed)

The constructor of an object of polymerization with a percent of initiator.

Parameters:
  • all_info (AllInfo) – The system information.
  • type (str) – The particle type of initiators.
  • percent (float) – The percent of initiators on target particle type.
  • nlist (NeighborList) – The neighbor list.
  • r_cut (float) – The cut-off radius.
  • seed (int) – The seed of random number generator
setPr(float prob)

specifies reaction probability.

setPr(string type1, string type2, float prob)

specifies reaction probability between particle type1 and type2.

setPrFactor(float prob_factor)

specifies the reaction probability factor of (factor)n where n is reaction times.

setPrFactor(cstring type1, string type2, float prob_factor)

specifies the reaction probability factor between particle type1and type2.

setExchangePr(string type1, string type2, string type3, float probability)

specifies the reaction probability of replacing type3 to connect to type 2 by type1.

setMaxCris(string type, unsigned int cris_max)

specifies the upper limit number of bonds generated by reaction.

setNewBondType(string bondtype)

specifies the type of newly generated bonds by reaction.

setFuncReactRule(bool switch, float K, float r_0, float b_0, float epsilon0, Func function)

switches the rule of the reaction according to energy and specifies the rule with spring constant K, the maximum length for FENE r_0, the equilibrium length of bond b_0, the energy to shift epsilon0, and bond potential type (the candidates are harmonic and FENE).

setMinDisReactRule(bool switch)

switches the rule of the reaction only with the nearest particle.

initExPoint()

switches on initializing reactive point for exchange reaction.

Example:

reaction = galamost.Polymerization(all_info, neighbor_list, 1.12246 ,16361)
reaction.setFuncReactRule(True, 1250.000, 1.0,0.470, 10.0, galamost.Polymerization.Func.harmonic)
reaction.setPr(0.002)
reaction.setMaxCris('B',3)
# sets the connected bond upper limited number.
reaction.setPeriod(50)
app.add(reaction)

Depolymerization model

class DePolymerization(all_info, T, seed)

The constructor of an object of depolymerization.

Parameters:
  • all_info (AllInfo) – The system information.
  • T (float) – The temperature.
  • seed (int) – The seed of random number generator
setParams(string type, float K, float r_0, float b_0, float epsilon0, float Pr, Func function)

specifies the depolymerization probability with bond type, spring constant K, the maximum length for FENE r_0, the equilibrium length of bond b_0, the energy to shift epsilon0, and bond potential type (the candidates are harmonic, FENE, and NoFunc. For “NoFunc”, only probability works for the judgement of bond rupture).

setT(float T)

specifies the temperature with a fixed value.

setT(Variant vT)

specifies the temperature with a varying value by time step.

Example:

reaction = galamost.DePolymerization(all_info, 1.0, 16361)
reaction.setParams('sticky', 10.0, 1.5, 0.96, 10.0, 0.2, galamost.DePolymerization.Func.harmonic)
# sets bondname, K, r_0, b_0, epsilon0, Pr, and function.
reaction.setPeriod(1)
# sets how many steps to react.
app.add(reaction)