4. Development Guidelines¶
4.1. Code Style¶
The project follows these coding conventions:
Indentation: 4 spaces (no tabs)
Line length: Maximum 100 characters
Formatting: Enforced by
.clang-formatconfiguration (LLVM-based)Comments: Use Doxygen-style documentation comments
Naming: - Classes: CamelCase (e.g.,
CodeEditor) - Functions: camelCase (e.g.,reformatLine) - Members: snake_case (e.g.,reformat_on_return)
4.2. Documentation¶
All public classes and functions should have Doxygen documentation:
/**
* @brief Brief description
*
* Detailed description if needed
*
* @param param1 Description of parameter
* @return Description of return value
*/
int myFunction(int param1);
4.3. Building¶
See Installation for detailed build instructions. For development:
# Debug build with Qt6
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug \\
-DLAMMPS_GUI_USE_PLUGIN=yes -DBUILD_DOC=no
cmake --build build --parallel 2
4.4. Contributing¶
To contribute to LAMMPS-GUI:
Fork the repository on GitHub
Create a feature branch
Make your changes with proper documentation
Ensure code compiles with both Qt5 and Qt6 (if possible)
Test your changes thoroughly
Submit a pull request
All contributions must:
Follow the existing code style
Include Doxygen documentation for new public APIs
Not break existing functionality
Have GPG-signed commits