A web-based cheminformatics toolkit using the Chemistry Development Kit (CDK) for molecular visualization and chemical descriptor calculations.
This application provides a modern web interface for analyzing chemical molecules using the Chemistry Development Kit (CDK). It allows users to:
- Parse molecules from SMILES notation
- Generate 2D molecular visualizations
- Calculate chemical descriptors
- Organize descriptors into meaningful categories
- View and analyze molecular properties
- Spring Boot: Java-based REST API
- CDK Library: Chemistry Development Kit for cheminformatics functions
- Maven: Build tool and dependency management
- React: UI framework
- Bootstrap: CSS framework for responsive design
- Tailwind CSS: Utility-first CSS framework
- Axios: HTTP client for API communication
There are multiple ways to deploy and run this application:
- Docker and Docker Compose installed
- Docker Desktop running (for macOS and Windows)
-
Clone the repository
git clone https://github.com/yourusername/CDK-iwomi-demo.git cd CDK-iwomi-demo -
Start the application with Docker Compose
docker-compose up
To run in detached mode:
docker-compose up -d
-
To rebuild containers after code changes:
docker-compose down docker-compose up --build
- Frontend UI: http://localhost:3000
- Backend API: http://localhost:8080/api/molecules/health
The frontend communicates with the backend using the environment variable REACT_APP_BACKEND_URL, which is set to http://localhost:8080 in the Docker configuration.
If you encounter connection issues between frontend and backend:
-
Run the diagnostic script for detailed diagnostics:
./debug-docker-network.sh
-
Common issues and solutions:
- Docker daemon not running: Start Docker Desktop
- Container startup errors: Check logs with
docker logs cdk-backendordocker logs cdk-frontend - Network connectivity: Make sure both containers are running on the same network
- API errors: Check if backend API is accessible at
/api/molecules/healthendpoint
-
Restart application with cleaned environment:
./restart-app.sh
- Java 11 or higher
- Maven 3.6+
- Node.js 16+ and npm
- Git
-
Navigate to the backend directory:
cd backend/cdk-webapp-backend -
Build and run the Spring Boot application:
# If Maven is installed mvn clean spring-boot:run # Or using Maven wrapper ./mvnw clean spring-boot:run
-
The backend server will start at http://localhost:8080.
-
Navigate to the frontend directory:
cd frontend/cdk-webapp-frontend -
Install dependencies:
npm install
-
Start the development server:
npm start
-
The frontend development server will start at http://localhost:3000.
GET /api/molecules/health: Check API health statusPOST /api/molecules/parse: Parse a molecule from SMILES notation{ "smiles": "CC(=O)OC1=CC=CC=C1C(=O)O" }GET /api/molecules/descriptors: Get all available chemical descriptorsGET /api/molecules/image?smiles={SMILES}: Generate a PNG image of a molecule
cdk-webapp/
├── backend/ # Spring Boot application
│ └── cdk-webapp-backend/
│ ├── src/main/java/ # Java source code
│ ├── pom.xml # Maven configuration
│ └── mvnw # Maven wrapper
└── frontend/ # React application
└── cdk-webapp-frontend/
├── public/ # Static files
├── src/ # React source code
├── package.json # npm dependencies
└── tailwind.config.js # Tailwind CSS config
cd backend/cdk-webapp-backend
mvn clean packagecd frontend/cdk-webapp-frontend
npm run buildThis project is licensed under the MIT License - see the LICENSE file for details.
- Chemistry Development Kit - The open-source cheminformatics toolkit