Makya generators let you specify substructures whose presence in the final generated molecules (or in the building blocks, when applicable) can be either forced or forbidden.
To do so, you can either:
- Use a Pains/Tox dictionary of motifs that shouldn't appear in any generated molecules;
- Specify Product or Building Blocks constraints, following the process described below.
AND/OR statements
It is possible to use AND and OR conditions to indicate if several substructures should all be found together, or prevented to be together (AND), or if the presence of any one of these substructures is enough to allow or forbid the generation of the molecule (OR).
To add several substructures with an AND condition, all the SMARTS should be indicated in the same text box, or the substructures drawn on the same page of the sketcher (see details below).
To add an OR condition, click on the blue Add button and specify each of the substructures one by one.
Substructure specification in generator set-up
To specify required or forbidden substructures, you can use:
The text box
To do so, directly write the SMARTS of the substructure(s) in the text box.

To create an AND condition, put a dot "." without spaces between the different SMARTS.
The sketcher
To do so, click on the pencil icon. This will open a sketcher page. You can paste a SMARTS directly into the sketcher and the molecule will be shown; alternatively, you can use the numerous drawing tools to draw the substructures you want to match/unmatch.
To indicate a "wild card" (a region of the substructure that could be any atom or group), you can use the A* button on the right of the screen.
To create an AND condition, simply draw all the substructures on the same page of the sketcher.

Explicit H atoms
When specifying a substructure for your generated molecules to match (or forbid), you might want some part totally unmodified. To do so, you can make the hydrogen atoms explicit in these parts of your substructure. This will prevent any local modification by the AI; all parts of the substructure where hydrogen atoms are not explicit could theoretically be modified during the generation (chain elongation for instance).
To make hydrogen atoms explicit, in the sketcher, click on the H (Add explicit Hs) button.
In the following example we paste a molecule in the sketcher. Then we make the hydrogens explicit and remove the central core, that we want to see modified by the AI. See the molecule in the sketcher below :
SMILES: NC1CCCC(C1)Nc1ccc2cccc(-c3cc4c(CCNC4=O)[nH]3)c2n1
To modify the scaffold while keeping the outer branches untouched, it is possible to make hydrogen atoms explicit, and then use the eraser tool to remove the central scaffold.
By doing so (explicit hydrogens then erase the part you want to see modified), the generated molecules are guaranteed to have the external branches untouched with a new central core attached on the green atoms where no explicit hydrogen were defined:
NOTE: be careful not to explicit hydrogen on 100% of the positions, otherwise you would block all possible exit vectors, preventing the generation to happen.
