Installation Guide
Prerequisites
Before installing RSoft CAD, ensure you have:
Python 3.6 or higher
RSoft CAD software (for running simulations)
Git (for cloning the repository)
Installation Methods
Method 1: Development Installation (Recommended)
For development or to get the latest features:
# Clone the repository
git clone https://github.com/SAIL-Labs/rsoft_cad.git
cd rsoft_cad
# Install in development mode
pip install -e .
This method allows you to modify the code and see changes immediately without reinstalling.
Method 2: Direct Installation
If you don’t plan to modify the code:
pip install git+https://github.com/SAIL-Labs/rsoft_cad.git
Dependencies
The package automatically installs the following Python dependencies:
numpy (≥1.2) - Numerical computations
matplotlib (≥2.0) - Plotting and visualization
pandas - Data manipulation and analysis
scipy - Scientific computing
seaborn - Statistical data visualization
Verification
To verify your installation, run:
import rsoft_cad
print(rsoft_cad.__version__)
Or test with a simple example:
from rsoft_cad.lantern import PhotonicLantern
from rsoft_cad.utils.config.modifier import load_config
# Load default configuration
config = load_config("config/default_config.json")
print("Installation successful!")
RSoft CAD Configuration
For running simulations, you’ll need RSoft CAD installed and properly configured:
Install RSoft CAD following the vendor’s instructions
Set environment variables (if required by your RSoft installation)
Verify RSoft commands are accessible from your command line
Common RSoft simulation packages used:
bsimw32- BeamPROP simulationsfemsimw32- FemSIM simulations
Development Setup
For contributors or advanced users:
# Clone and enter directory
git clone https://github.com/SAIL-Labs/rsoft_cad.git
cd rsoft_cad
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with all dependencies
pip install -e .
# Install development tools (optional)
pip install pytest black flake8
Troubleshooting
Common Issues
Import Error: If you get import errors, ensure:
Python version is 3.6+
All dependencies are installed
Virtual environment is activated (if using one)
RSoft Simulation Errors: If simulations fail:
Verify RSoft CAD is properly installed
Check RSoft license is valid
Ensure simulation executables are in PATH
Path Issues: If config files aren’t found:
Run Python from the project root directory
Use absolute paths for configuration files
Check file permissions
Getting Help
If you encounter issues:
Check the GitHub issues
Review the examples in the
examples/directoryContact: bongkokwei@gmail.com
Next Steps
Once installed, proceed to:
Quick Start Guide - Basic usage
Tutorials - Step-by-step examples
Examples - Code samples