The RADIS Application is a web-based interface for the RADIS library, which is used for high-resolution infrared molecular spectra calculations. This project provides an intuitive user interface that allows researchers and non-researchers to access powerful spectroscopic calculations without writing code.
- Spectrum Calculation: Compute molecular spectra using various databases (HITRAN, HITEMP, GEISA)
- Spectrum Visualization: Interactive plotting with Plotly.js
- Spectrum Fitting: Fit experimental spectra to theoretical models
- Data Export: Download spectra in various formats
- Non-equilibrium Calculations: Support for non-equilibrium molecular states
The system follows a client-server architecture where the frontend sends calculation requests to the backend, which performs the spectral calculations using the RADIS library and returns the results for visualization.
- React 18 with TypeScript for type safety
- Material-UI (MUI) for consistent UI components
- React Hook Form for form management and validation
- Zustand for state management
- Plotly.js for interactive scientific plotting
- Vite for fast development and building
- FastAPI for high-performance API endpoints
- RADIS library for spectroscopic calculations
- Pydantic for data validation and serialization
- Uvicorn as ASGI server
- Pytest for testing
radis-app/
├── frontend/ # React frontend application
│ ├── __tests__/ # Frontend test files
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── fields/ # Form field components
│ │ │ └── ... # Other components (Plot, Form, Header, etc.)
│ │ ├── store/ # Zustand state management
│ │ ├── modules/ # Utility modules
│ │ │ ├── form-schema.ts # Form validation schemas
│ │ │ └── ... # Other utility modules
│ │ └── constants.ts # Application constants
│ ├── package.json
│ └── vite.config.ts
├── backend/ # FastAPI backend application
│ ├── __tests__/ # Backend test files
│ ├── radis_scripts/ # RADIS utility scripts
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ ├── models/ # Pydantic models
│ │ ├── helpers/ # Utility functions
│ │ └── constants/ # Backend constants
│ ├── requirements.txt
│ └── Dockerfile
└── README.md
After setting up the development environment and running the server locally, you can also refer to the Swagger and Redocly documentation for the backend at:
- Node.js 18+ and npm/yarn/pnpm
- Python 3.8+ and pip
- Git
-
Clone the repository
git clone https://github.com/arunavabasu-03/radis-app.git cd radis-app -
Install dependencies
cd frontend npm install # or yarn install or pnpm install
-
Start development server
npm run dev # or yarn dev or pnpm dev -
Access the application
- Frontend: http://localhost:5173
- Backend: http://localhost:8000
-
Navigate to backend directory
cd backend -
Create virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Start the server
uvicorn src.main:app --reload
Create .env files for environment-specific configuration:
VITE_API_ENDPOINT = "http://127.0.0.1:8000/"
VITE_API_ENDPOINT_LOCAL= "http://127.0.0.1:8080/"Since the HITEMP database requires registration, you can create an account here:
HITRAN_EMAIL=your-email
HITRAN_PASSWORD=your-passwordYou can run the backend locally using Docker. This is useful if your local machine is powerful and you will have option to use GPU.
cd backend
docker build -t radis-app-backend .
docker run -p 8000:8000 radis-app-backendYou can even mount your existing databases (if you've used the RADIS package) by running the container with the following command:
docker run -d -p 8080:8080 \
-v /home/mohy/.radisdb:/root/.radisdb \
-v /home/mohy/radis.json:/root/radis.json \
radis-backendDeployment Status
- Vercel: frontend
- Google Cloud Run: backend
If you encounter library not found for -lhdf5 error on MacOS:
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install HDF5
brew install hdf5
# Fix Homebrew directory bug
export HDF5_DIR=/opt/homebrew/opt/hdf5
# Reinstall requirements
pip install -r requirements.txt- Be respectful and inclusive
- Follow the project's coding standards
- Provide constructive feedback
- Fork the repository
- Create a feature branch
- Make your changes
- Write/update tests
- Update documentation
- Submit a pull request
Use conventional commit messages:
feat: add new spectrum calculation feature
fix: resolve wavenumber range validation issue
docs: update API documentation
test: add unit tests for molecule selector
refactor: improve error handling in backend
When reporting issues, include:
- Description: Clear description of the problem
- Steps to reproduce: Detailed steps to reproduce the issue
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment: OS, browser, versions
- Screenshots: If applicable
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the coding standards (see below)
- Write tests for new functionality
- Update documentation if needed
-
Test your changes
# Frontend tests and checks cd frontend yarn lint yarn type-check yarn test # Run tests with coverage yarn test:coverage # Backend tests cd backend pytest
-
Commit your changes
git add . git commit -m "feat: add your feature description"
-
Push and create a pull request
git push origin feature/your-feature-name
This developer guide should help you get started with contributing to the RADIS Application project. If you have any questions or need clarification, please don't hesitate to ask in the project's GitHub discussions or issues.
