Polymers

Details

Polymer and CoPolymer example classes.

class flowermd.library.polymers.EllipsoidChain(lengths, num_mols, lpar, bead_mass, bond_length)

Bases: Polymer

Create an ellipsoid polymer chain.

This is a coarse-grained molecule where each monomer is modeled as an anisotropic bead (i.e. ellipsoid).

Notes

In order to form chains of connected ellipsoids, “ghost” particles of types “A” and “B” are used.

This is meant to be used with flowermd.library.forcefields.EllipsoidForcefield and requires using flowermd.utils.rigid_body to set up the rigid bodies correctly in HOOMD-Blue.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.

  • lpar (float, required) – The semi-axis length of the ellipsoid bead along its major axis.

  • bead_mass (float, required) – The mass of the ellipsoid bead.

  • bond_length (float, required) – The bond length between connected beads. This is used as the bond length between ellipsoid tips rather than between ellipsoid centers.

class flowermd.library.polymers.LJChain(lengths, num_mols, bead_sequence=['A'], bead_mass={'A': 1.0}, bond_lengths={'A-A': 1.0})

Bases: Polymer

Create a coarse-grained bead-spring polymer chain.

Parameters:
  • lengths (int, required) – The number of times to repeat bead_sequence in a single chain.

  • bead_sequence (list; default ["A"]) – The sequence of bead types in the chain.

  • bond_length (dict; optional; default {"A-A": 1.0}) – The bond length between connected beads (units: nm).

  • bead_mass (dict; default {"A": 1.0}) – The mass of the bead types.

class flowermd.library.polymers.PEEK(lengths, num_mols, **kwargs)

Bases: Polymer

Create a Poly(ether-ether-ketone) (PEEK) chain.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.

class flowermd.library.polymers.PEKK(lengths, num_mols, force_field=None, sequence=None, TI_ratio=0.5, seed=24)

Bases: CoPolymer

Create a Poly(ether-ketone-ketone) (PEKK) chain.

Creates a polymer chain with two different monomer types, represented by the para (T) and meta (I) isomeric forms of PEKK.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.

  • sequence (str, default None) – Manually define the sequence of para (T) and meta (I) monomers. Leave as None if generating random sequences. Example: sequence = “TTITTITTI”

  • TI_ratio (float, required) – The ratio of meta to para isomers in the chain.

class flowermd.library.polymers.PEKK_meta(lengths, num_mols)

Bases: Polymer

Create a Poly(ether-ketone-ketone) (PEKK) chain.

The bonding positions of consecutive ketone groups takes place on the meta site of the phenyl ring.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.

class flowermd.library.polymers.PEKK_para(lengths, num_mols)

Bases: Polymer

Create a Poly(ether-ketone-ketone) (PEKK) chain.

The bonding positions of consecutive ketone groups takes place on the para site of the phenyl ring.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.

class flowermd.library.polymers.PPS(lengths, num_mols, **kwargs)

Bases: Polymer

Create a Poly(phenylene-sulfide) (PPS) chain.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.

class flowermd.library.polymers.PolyEthylene(lengths, num_mols, **kwargs)

Bases: Polymer

Create a Poly(ethylene) chain.

Parameters:
  • lengths (int, required) – The number of monomer repeat units in the chain.

  • num_mols (int, required) – The number of chains to create.