Templates#
- class cgbind.templates.Template(arch_name, mol2_filename)#
- __init__(arch_name, mol2_filename)#
Initialise a Template object
- Parameters:
arch_name – (str) Name of the architecture
mol2_filename – (str) Name of the .mol2 file to read a structure from e.g. downloaded from the CCDC
- save_template()#
Save the template to ./lib/self.arch_name.obj
- Returns:
None
- class cgbind.templates.Linker(atoms, x_atoms)#
- __init__(atoms, x_atoms)#
Make a template linker object from the corresponding xyzs and the donor atoms which were bonded to the metals which form the basis of the cage
- Parameters:
atoms – (list(list))
x_atoms – (list(int)) Donor atom ids in the xyzs
- atoms#
(list(list))
- bonds#
(list(Atom))
- com#
(np.ndarray)
- coords#
(list(np.ndarray)) Linker coordinates
- x_atoms#
(list(int)) List of donor atoms in the linker
- x_motifs#
(list(Xmotif objects)
- class cgbind.templates.Metal(label, atom_id, coord)#
- __init__(label, atom_id, coord)#
Template metal
- Parameters:
label – (str) Atomic symbol of the metal
atom_id – (int) Atom id in the Template
coord – (np.ndarray) Coordinate of the atom
- atom_id#
(int)
- coord#
(np.ndarray) Coordinate of the atom/ion
- label#
(str) Atomic symbol
- shift_vec#
(np.ndarray) Vector to shift by when expanding/contracting
- cgbind.templates.find_mols_in_xyzs(atoms, allow_same=False)#
From a list of xyzs determine the bonds in the system, thus the distinct molecules in the system
- Parameters:
atoms – (list(cgbind.atoms.Atom))
allow_same – (bool) add only the unique molecules (False) or add every molecule (True)
- Returns:
(list(xyzs))
- cgbind.templates.get_template(arch_name='m2l4', folder_path=None)#
Get a template defined by the architectures arch_name. The saved objects are in
- Parameters:
arch_name – (str)
folder_path – (str) Path to the folder where the templates are stored. Has a default
- Returns:
(object) Template