import os import subprocess # Install conda-forge rdkit if not already available try: from rdkit import Chem from rdkit.Chem import Draw except ImportError: subprocess.run(["pip", "install", "rdkit-pypi"], check=True) # Ensure Java is available for PaDEL java_path = subprocess.run(["which", "java"], capture_output=True, text=True) if not java_path.stdout.strip(): raise RuntimeError("Java not found. Please ensure openjdk-11-jdk is installed.")