How 12keerti21/chemxplore works
Project Type and Purpose
• Full-stack Python package with three user interfaces:
a. Command-line tool (admet_predict)
b. Python API (ADMETModel)
c. Web server (Flask app under admet_ai/web)
File Structure Analysis
• Top level:
• admet_ai/ – main Python package
• scripts/ – data preparation, training, plotting utilities
• static/, templates/ – fallback front-end assets (mirrors web app)
• Dockerfile, setup.py, requirements.txt – build and deploy
• admet_ai/ layers:
• Core API (admet_info.py, admet_model.py, admet_predict.py)
• Analysis (analysis/) – result processing
• Resources (resources/data, resources/models) – CSV and PyTorch model binaries
• Web (web/app/) – Flask MVC structure (config, models, views, templates, static) plus run/wsgi entrypoints
• Utilities (utils.py, storage.py)
README Insights
• Confirms three interfaces and optional extras ([tdc], [web] dependencies)
• Mentions Docker support, GPU fallback to CPU, uses TDC datasets, RDKit, Chemprop
a. Main Components
• User Interfaces: CLI tool, Python API, Web UI
• Core Service: ADMETModel service (model loading, prediction logic)
• Data & Models: local CSV data store, pretrained PyTorch models
• Analysis & Plotting: resultanalyzer, plotting scripts
• External Libraries/Services: RDKit, Chemprop, TDC data
• Deployment: Docker container, WSGI server (Gunicorn/Flask)
b. Relationships & Interactions
• CLI/API/Web → call ADMETModel → loads models from resources/models → calls Chemprop inference via admet_predict.py → returns predictions
• Analysis scripts (scripts/) read prediction CSVs → feed analysis/results_analyzer.py → output plots
• Web UI (Flask controllers in views.py) invoke ADMETModel → render HTML templates with JSME molecule editor → static JS/CSS assets
c. Architectural Patterns & Principles
• Layered architecture:
1. Presentation (CLI / Web)
2. Application core (ADMETModel service)
3. Data (model files, resource CSV)
• MVC in web app: Flask views/models/templates
• Separation of concerns: API vs. web vs. analysis vs. scripts
d. Key Technologies & Frameworks
• Python 3.10+, Flask for web
• PyTorch (Chemprop) for model inference
• RDKit for feature computation
• Pandas for data handling
• Docker for containerization