pysoftk.linear_polymer package
Submodules
pysoftk.linear_polymer.calculators module
- class pysoftk.linear_polymer.calculators.Opt(xyz_file)[source]
Bases:
object
Geometrical optimization tools using GFN-XTB2 and PySCF as engines.
Note
This class requires a GFN-XTB executable and/or a PYSCF semiempirical installation to be used.
- pyscf_semi(steps)[source]
Function invoking PYSCF semiempirical implementation for geometry optimization.
- Parameters:
steps (int, optional) – Number of steps which PYSCF code will perform the optimization routine.
- Returns:
Print the file pyscf_final.xyz reporting the results from a PYSCF calculation.
- Return type:
None
- class pysoftk.linear_polymer.calculators.Pyscf_print[source]
Bases:
object
Print a PYSCF object into cartesian coordinates.
- xyz(mol)[source]
Function to print a file with Cartesian coordinates from a PYSCF geometry optimization calculation.
- Parameters:
mol (pyscf.gto.mole.Mole) – A PySCF gto mole Mole object.
- Returns:
pysfc_final – An xyz file containing the optimized coordinates of the provided PYSCF Mole object.
- Return type:
str
pysoftk.linear_polymer.linear_polymer module
- class pysoftk.linear_polymer.linear_polymer.Lp(mol, atom, n_copies, shift)[source]
Bases:
object
A class for creating a linear polymer from given RdKit molecules.
Examples
Note
RDKit package must be installed.
- atom
- bond_conn(outmol)[source]
Function to peruse the bonds and connections of place-hold atom within a super_monomer object.
- Parameters:
outmol (rdkit.Chem.rdchem.Mol) – RDKit Mol object
- Returns:
Tuple – A tuple of lists containing connections and neighbours of the place-holder atom.
- Return type:
list
- copy_mol()[source]
Function to replicate super_monomers.
- Parameters:
mol (rdkit.Chem.rdchem.Mol) – RDKit Mol object
- Returns:
fragments – List of RDKit Mol objects
- Return type:
list
- linear_polymer(force_field='MMFF', relax_iterations=350, rot_steps=125, no_att=True)[source]
Function to create a linear polymer from a given super_monomer object.
- Parameters:
force_field (str) – Selected Force-Field from RDKit options, i.e., UFF, MMFF, or MMFF94.
relax_iterations (int) – The maximum number of iterations used for the FF.
rot_steps (int) – Number of steps for rotor optimization.
no_att (bool, optional) – If True, remove placeholder atoms. Defaults to True.
- Returns:
newMol_H – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- max_dist_mol()[source]
Returns the maximum distance between atoms from an RDKit Mol Object.
- Returns:
maximum value from a Molecule Bound Matrix
- Return type:
np.float
- mol
- n_copies
- polimerisation(fragments)[source]
Function to produce a polymer in a recursive manner.
- Parameters:
fragments (list) – A list of RDKit objects.
- Returns:
outmol – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- proto_polymer()[source]
- Function to create a linear polymer from a given
super_monomer object.
- Returns:
newMol_H – RDKit Mol object
- Return type:
rdkit.Chem.rdchem.Mol
- shift
pysoftk.linear_polymer.mol_conformer module
- class pysoftk.linear_polymer.mol_conformer.Mcon(mol, num_conf)[source]
Bases:
object
Calculates molecular conformers
Example
Note
This class requires RDKit to be installed.
- conformer(output_name)[source]
Calculate a molecular conformer for a given molecule. If enabled the highest-energy conformer is returned.
- Returns:
list of molecules – SDWriter Mol object
- Return type:
rdkit.Chem.Mol
- mol
- num_conf
pysoftk.linear_polymer.super_monomer module
- class pysoftk.linear_polymer.super_monomer.Emb[source]
Bases:
object
Class created to use the ETKDGV3 method provided in RDKit for 3D Geometry embedding.
- class pysoftk.linear_polymer.super_monomer.Sm(mol_1, mol_2, atom)[source]
Bases:
object
Class to create a new combined molecule from two provided RDKit Mol objects.
Example
Note
This class requires RDKit to be installed.
- atom
- constructor()[source]
Function to combine two molecules using an atom placeholder.
- Returns:
mol_4 – The resulting combined molecule as RDKit Mol Object.
- Return type:
rdkit.Chem.rdchem.Mol
- mol_1
- mol_2