A web-based application for parsing, viewing, and analyzing CHARMM parameter files with an intuitive user interface. This tool provides a modern, interactive interface for researchers and developers working with CHARMM parameter files.
- Upload CHARMM parameter files via drag-and-drop or file browser
- Multi-file support with individual file management
- Secure file handling with automatic directory creation
- File deletion and system reset capabilities
- Automatic parsing of CHARMM parameter file sections:
- ATOMS
- BONDS
- ANGLES
- DIHEDRALS
- IMPROPER
- Preservation of comments and metadata
- Line number tracking for source reference
- Split-view interface with data table and source file viewer
- Collapsible sidebar for file management
- Material Design icons and modern styling
- Responsive layout adapting to screen sizes
- Interactive data tables with sorting capabilities
- Section-based organization with tabbed interface
- Real-time search filtering across all columns
- Highlighted line references between table and source
- CSV export for individual sections
- Preserved data formatting and comments
- Structured file naming for exports
- Syntax-highlighted parameter file display
- Line numbering with reference highlighting
- Text size controls (zoom in/out)
- Word wrap toggle
- Quick navigation to referenced lines
- Real-time filtering within sections
- Multi-term search support
- Case-insensitive matching
- Support for partial word matches
- Modern responsive design using CSS Grid and Flexbox
- Custom scrollbar styling for better usability
- Material Icons integration
- Fira Code monospace font for parameter display
- Animated transitions and hover effects
- Cross-browser compatibility
- Mobile-friendly interface
- Flask-based RESTful API
- Pandas for data processing and analysis
- Secure file upload handling
- Automatic file organization
- CSV generation capabilities
- Error handling and validation
- Type hints and documentation
- Efficient file parsing algorithms
- Optimized data storage
- Quick search and filter operations
- Responsive UI with minimal loading times
- Memory-efficient data handling
- Python 3.8 or higher
- pip (Python package installer)
- Modern web browser (Chrome, Firefox, Safari, or Edge)
- Git (for version control)
- Clone the repository:
git clone https://github.com/fl-sean03/CHARMM-Parameter-File-Search-Engine.git
cd charmm-parameter-search
- Create and activate a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install required dependencies:
pip install -r requirements.txt
- Start the Flask application:
python app.py
- Open your web browser and navigate to:
http://localhost:5000
-
Upload a CHARMM parameter file:
- Drag and drop files into the upload area
- Click to browse and select files
- Supported formats: .txt, .par
-
View and analyze data:
- Switch between different sections using tabs
- Download specific sections as CSV files
- Delete or reset files as needed
charmm-parameter-search/
├── app.py # Flask application main file
├── backend/
│ ├── core.py # Core processing logic
│ ├── parsers.py # File parsing functionality
│ ├── utils.py # Utility functions
│ └── tests/ # Test files
├── frontend/
│ ├── static/
│ │ ├── css/ # Stylesheets
│ │ └── js/ # JavaScript files
│ └── templates/ # HTML templates
├── uploads/ # Directory for uploaded files
├── requirements.txt # Project dependencies
├── LICENSE # License information
└── README.md # Project documentation
GET /
: Main application interfacePOST /upload
: Upload parameter filesPOST /delete
: Delete uploaded filesPOST /reset
: Reset all uploaded filesPOST /get_file_data
: Get parsed data for a specific fileGET /download_csv/<section>/<dir>
: Download section data as CSV
All API endpoints return JSON responses with the following structure:
{
"message": "Success/Error message",
"data": {
"section_name": [...],
...
}
}
- Install development dependencies:
pip install -r requirements-dev.txt
- Run in development mode:
export FLASK_ENV=development
export FLASK_APP=app.py
flask run
- Follow PEP 8 guidelines
- Use type hints for function parameters
- Document functions using docstrings
- Keep functions focused and single-purpose
python -m pytest backend/tests/
python -m pytest --cov=backend tests/
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Include a clear description of changes
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass
- Follow the existing code style
-
Upload Errors
- Ensure file format is supported (.txt, .par)
- Check file size limits
- Verify file permissions
-
Parser Errors
- Validate CHARMM parameter file format
- Check for file encoding issues
- Ensure complete section headers
-
Server Issues
- Verify Python version compatibility
- Check all dependencies are installed
- Ensure proper file permissions in uploads directory
- Input validation for all file uploads
- Secure file handling and storage
- Protection against common web vulnerabilities
- Regular security updates and patches
This project is licensed under the MIT License - see the LICENSE file for details.
- CHARMM Parameter File Format Documentation
- Flask Web Framework
- Pandas for Data Processing
- Material Icons for UI elements
- Open Source Community
- v1.0.0 (2024-01-23)
- Initial release
- Basic file parsing functionality
- Web interface implementation
- CSV export capability
Project Link: https://github.com/fl-sean03/CHARMM-Parameter-File-Search-Engine
If you use this software in your research, please cite:
@software{charmm_parameter_search,
author = {Your Name},
title = {CHARMM Parameter File Search Engine},
year = {2024},
url = {https://github.com/yourusername/charmm-parameter-search}
}