How m3g/packmol works
Project type and purpose
• This is a scientific, command-line, monolithic Fortran application (“Packmol”) whose goal is to build initial configurations for molecular‐dynamics simulations by packing molecules under spatial constraints.
• It is not a web or full-stack app; rather, it is a high-performance CLI tool with an extensible Fortran code base, multiple build scripts (Makefile, CMake, fpm), and a test harness.
File structure
• Top-level directories and files:
• .github/workflows/actions.yml – CI pipeline for builds/tests
• CMakeLists.txt, Makefile, configure, compile_cmake.sh, fpm.toml – different build entry points
• app/packmol.f90, solvate.tcl – main application wrapper and auxiliary scripts
• header/ – Fortran module interface definitions
• src/ – dozens of Fortran implementation files, each module handling a specific algorithmic piece (e.g., cell_indexing, heuristics, random, pbc)
• testing/ – Julia and shell‐based test harness, reference inputs and outputs
• Notice: monolithic module structure, no frontend/backend separation; the architecture is “modular monolith.”
README for additional insights
• Confirms CLI usage, supported formats (PDB, TINKER, XYZ).
• Outlines two main build flows: classic make/configure and fpm.
• References external dependencies: Fortran compilers (gfortran, ifort), Julia (for tests), GitHub Actions.
Detail without overthinking
• Every logical module group (I/O, geometry, heuristics, random number, boundary conditions, utilities).
• Every build script variant and test pathway.