pysoftk.topologies package
Submodules
pysoftk.topologies.branched module
- class pysoftk.topologies.branched.Bd(core, arm, atom)[source]
Bases:
object
A class for creating a branched polymer from given RDKit molecules.
Examples
Note
RDKit package must be installed.
- arm
- atom
- branched_polymer(iter_ff=100, FF='MMFF', swap_H=True)[source]
Function to create branched polymers
- Parameters:
FF (str) – Selected FF between MMFF or UFF
relax_iterations (int) –
Number of iterations used for relaxing a molecular object.
- swap_H: bool
Indicates if the user defined atomic place holder is changed to a Hydrogen atom or remain as the used species.
- Returns:
newMol_H – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- core
- merge_arms(core, arm, atom)[source]
- Function to attach user defined molecules to a
provided molecular core using a placeholder.
- Parameters:
core (rdkit.Chem.rdchem.Mol) – RDKit Mol object
arm (rdkit.Chem.rdchem.Mol) – RDKit Mol object.
atom (str) – The placeholder atom to combine the molecules and form a new monomer.
- Returns:
mol – RDKit Mol object.
- Return type:
rdkit.Chem.rdchem.Mol
pysoftk.topologies.diblock module
- class pysoftk.topologies.diblock.Db(ma, mb, atom)[source]
Bases:
object
- A class for creating a diblock copolymers from
given RDKit molecules.
Examples
Note
RDKit package must be installed.
- atom
- diblock_copolymer(len_block_A, len_block_B, FF='MMFF', relax_iterations=100)[source]
Function to create a diblock copolymer
- Parameters:
len_block_A (int) – Length of the molecular block A
len_block_B (int) – Length of the molecular block B
FF (str) – Selected FF between MMFF or UFF
relax_iterations (int) – Number of iterations used for relaxing a molecular object.
- Returns:
diblock – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- ma
- mb
- class pysoftk.topologies.diblock.Pt(pattern, mols, atom)[source]
Bases:
object
A class for creating a Patterned polymers from a list of RDKit molecules.
Examples
Note
RDKit package must be installed.
- atom
- mols
- pattern
- pattern_block_poly(relax_iterations=100, FF='MMFF', swap_H=True)[source]
Function to create a polymer based on an alphabetic ordered pattern.
- Parameters:
relax_iterations (int) – Number of iterations used for relaxing a molecular object.
FF (str) – Selected FF between MMFF or UFF
swap_H (bool) – Indicates if the user defined atomic place holder is changed to a Hydrogen atom or remain as the used species.
- Returns:
return – A molecular pysoftk object.
- Return type:
mol
pysoftk.topologies.ranpol module
- class pysoftk.topologies.ranpol.Rnp(ma, mb, atom)[source]
Bases:
object
A class for creating a random copolymer from given RDKit molecules.
Examples
Note
RDKit package must be installed.
- atom
- ma
- mb
- random_ab_copolymer(len_polymer, pA, relax_iterations=100, FF='MMFF', swap_H=True)[source]
- Function to build a random copolymer using an user provided
probability (pA) for merging the monomer ma and imposing the condition pB=1-pA.
- Parameters:
len_polymer (int) – User defined length of the polymer.
pA (float) – User defined attaching probability of ma.
iter_ff (int) – User defined iterations for a FF.
FF (str) –
User selected FF between “MMFF” or “UFF”.
- swap_H: bool
Indicates if the user defined atomic place holder is changed to a Hydrogen atom or remain as the used species.
- Returns:
mol – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- random_abc_copolymer(mc, len_polymer, pA, pB, relax_iterations=100, FF='MMFF', swap_H=True)[source]
- Function to build a random copolymer based on an user defined
probability (pA) of merging mA, pB for monomer mb, and the condition pC=1-pA-pB.
- Parameters:
mc (rdkit.Chem.rdchem.Mol) – RDKit Mol object #
len_polymer (float) – User defined length of the polymer.
pA (float) – User defined attaching probability of ma.
pB (float) – User defined attaching porbability of mb.
atom (str) – User defined atom used as place-holder.
iter_ff (int) – User defined iterations for a FF.
FF (str) – User selected FF.
swap_H (bool) – Indicates if the user defined atomic place holder is changed to a Hydrogen atom or remain as the used species.
- Returns:
mol – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
pysoftk.topologies.ring module
- class pysoftk.topologies.ring.Rn(mol, atom)[source]
Bases:
object
- A class for creating a circular (ring-shaped) polymer
from given RDKit molecules.
Examples
Note
RDKit package must be installed.
- atom
- check_proto(mol, FF='MMFF', iter_ff=100)[source]
Function to check the proto polymer creation.
- Parameters:
mol (rdkit.Chem.rdchem.Mol) – RDKit Mol object
FF (str) – Selected FF to perform a relaxation
iter (int) – Number of iterations to perform a FF geometry optimisation.
- Returns:
newMol_H – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- create_ring(mol, atom)[source]
- Function to create a circular polymer based on a RDKit
molecular object.
- Parameters:
mol (rdkit.Chem.rdchem.Mol) – RDKit Mol object
atom (str) – The placeholder atom to combine the molecules and form a new monomer
- Returns:
final – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- mol
- pol_ring(len_polymer=2, FF='MMFF', iter_ff=100, shift=1.25)[source]
Function to create a polymer with ring structure (circular)
- Parameters:
mol (rdkit.Chem.rdchem.Mol) – RDKit Mol object
atom (str) – The placeholder atom to combine the molecules and form a new monomer
len_polymer (int) – Extension of the polymer
FF (str) – Selected FF to perform a relaxation
iter_ff (int) – Number of iterations to perform a FF geometry optimisation.
shift (float) – User defined shift for spacing the monomers using the LP function.
- Returns:
pol_ring – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol