input_cores & input_ligands

Thia section related relates the importing and processing of cores and ligands. Ligand & cores can be imported from a wide range of different files and files types, which can roughly be divided into three categories:

  1. Files containing coordinates of a single molecule: .xyz, .pdb & .mol files.

  2. Python objects: plams.Molecule, rdkit.Chem.Mol & SMILES strings (str).

  3. Containers with one or multiple input molecules: directories & .txt files.

In the later case, the container can consist of multiple SMILES strings or paths to .xyz, .pdb and/or .mol files. If necessary, containers are searched recursively. Both absolute and relative paths are explored.

Default Settings

        guess_bonds: False

    - OC(C)=O
    - OC(CC)=O
    - OC(CCC)=O
    - OC(CCCC)=O

Optional arguments

  • Type - bool

  • Default valueFalse

Try to guess bonds and bond orders in a molecule based on the types atoms and the relative of atoms. Is set to False by default, with the exception of .xyz files.

  • Type - int

  • Default value0

The column containing the to be imported molecules. Relevant when importing structures from .txt and .xlsx files with multiple columns. Relevant for .txt and .csv files. Numbering starts from 0.

  • Type - int

  • Default value0

The first row in a column which contains a molecule. Useful for when, for example, the very first row contains the title of aforementioned row, in which case row = 1 would be a sensible choice. Relevant for .txt and .csv files. Numbering starts from 0.


The behaviour of this argument depends on whether it is passed to a molecule in input_cores or input_ligands:


Manually specify the atomic index of one ore more atom(s) in the core that will be replaced with ligands. If left empty, all atoms of a user-specified element (see optional.cores.dummy) will be replaced with ligands.


Manually specify the atomic index of the ligand atom that will be attached to core (implying argument_dict: optional.ligand.split = False). If two atomic indices are provided (e.g. (1, 2)), the bond between atoms 1 and [2] will be broken and the remaining molecule containing atom 2 is attached to the core, (implying argument_dict: split = True). Serves as an alternative to the functional group based CAT.find_substructure() function, which identifies the to be attached atom based on connectivity patterns (i.e. functional groups).


Atom numbering follows the PLAMS [1, 2] convention of starting from 1 rather than 0.