File size: 464 Bytes
a07fa4c
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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.")