I have a working docking setup with a substructure constraint between a protein residue atom and the substrate to be docked. However, I need to add a distance constraint between the cofactor (see below) and the same substrate. Attempts to do this result in a runtime error of 'Cannot find appropriate protein.' The code is based on the CCDC docking sample and works properly w/o the distance constraint.
* the 'fixed' cofactor is part of the protein PDB file (Z:COF1)
* the substrate is the ligand to be docked and is in a separate mol2 file
* I get the cofactor atom using
cofactor_atom = [a for a in self.protein.ligands.atoms if a.label=="H24"]
* I get the substrate atom using (after reading the mol2 file it into self.substrate - same approach used for the substructure constraint that works)
substrate_atom = [a for a in self.substrate.atoms if a.label=="O1"]
* I then try calling the add constraint function which fails (both atoms used are previously found properly)
It looks like the issue is with the cofactor atom being in the protein ligands (if I use a protein residue atom then I can add the constraint). Is there a proper way to define a distance constraint between a cofactor, that is part of the protein pdb file, and the ligand to be docked?