Pharmacophore modeling represents the interaction features and geometry associated with biological activity. A compound needs suitable functional groups, arranged at suitable distances, angles, and orientations, to interact with a biological target. Features can include hydrogen-bond donors and acceptors, hydrophobic areas, and aromatic interactions. section 7.3.2
In ligand-based modeling, the starting point is a set of ligands with related activity. For each ligand, generate reasonable conformers—possible three-dimensional arrangements—and annotate their interaction features. Align conformers from different compounds to look for shared features and geometry. The resulting pattern can help score compounds in a screening database. section 7.3.2
Figure 7.12 A) Morphine pharmacophore. B) Pharmacophore-based explanation for discrepancy in biological effects of adrenaline stereoisomers. C) Example pharmacophore features separated by a certain distance, which we can satisfy by selecting the shown functional groups and linking them to preserve desired spacing.

The examples show why feature placement matters: the orientation of an adrenaline stereoisomer affects whether it can make a hydrogen-bond contact. section 7.3.2
Structure-based modeling instead considers features in relation to a target. In fragment-based drug discovery, experimental screening identifies small fragments that bind a target; their features can inform the design and screening of larger compounds. section 7.3 section 7.3.2
One structure-based screening workflow uses density estimation to model feature placement:
- Annotate experimentally identified fragment hits with three-dimensional pharmacophore features, such as donors, acceptors, and aromatic groups. section 7.3.3
- Calculate distances between feature pairs across fragments and fit kernel density estimates to the observed pair distributions. section 7.3.3
- Annotate candidate molecules and score their feature-pair distances against the fitted distributions. This is a screening aid rather than a guarantee of biological activity. section 7.3.3
Listing 7.11 Load Fragment Ensemble & Featurize with 3D Pharmacophores
import os
from tqdm import tqdm
from rdkit.Chem import MolToSmiles, PandasTools
from rdkit.Chem import ChemicalFeatures #A
from rdkit.RDPaths import RDDataDir
def compute_pcore_data(mol, mol_id=0): #B
pcores_of_interest = \ #C
['Donor', 'Acceptor', 'Aromatic'] #C
fdefFile = os.path.join(RDDataDir, 'BaseFeatures.fdef')
featFactory = ChemicalFeatures.BuildFeatureFactory(fdefFile)
atom_coordinates = \ #D
mol.GetConformer().GetPositions() #D
pharmacophore_features = featFactory.GetFeaturesForMol(mol)
rows = []
for pcore in pharmacophore_features:
pharmacophore_name = pcore.GetFamily()
if pharmacophore_name in pcores_of_interest:
atom_ids = pcore.GetAtomIds()
xyz = np.mean(
[atom_coordinates[id] for id in atom_ids], axis=0
)
rows.append({
'pcore': pharmacophore_name,
'smiles': MolToSmiles(mol),
'mol_id': mol_id,
'coord_x': xyz[0],
'coord_y': xyz[1],
'coord_z': xyz[2],
})
return pd.DataFrame(rows)
sdfFile = 'CH07/data/raw/mpro_frags.sdf' #E
df_fragments = PandasTools.LoadSDF(
sdfFile, idName='name', smilesName='SMILES', molColName='mol')
mols = df_fragments['mol'].values
dfs = []
for mol_id, mol in tqdm(enumerate(mols), total=len(mols)):
dfs.append(compute_pcore_data(mol, mol_id))
pcore_df = pd.concat(dfs, ignore_index=True)
print(pcore_df.head(2))
Output:
pcore smiles mol_id coord_x coord_y coord_z
0 Donor COC(=O)c1ccc(S(N)(=O)=O)cc1 0 8.8612 5.1249 22.898
1 Acceptor COC(=O)c1ccc(S(N)(=O)=O)cc1 0 13.0860 -1.0960 24.530This RDKit listing extracts donor, acceptor, and aromatic features and their coordinates from fragment conformers. section 7.3.3
The density model needs enough fragment data to learn a useful distribution. Separately, when a target’s binding-site structure is available, pharmacophore hypotheses can help select an initial set of compounds for docking. section 7.3.3 section 9.2.4
