Migration summary for pBabel CMake/Python3 port
===============================================

Scope
-----
This document records the changes applied during the pBabel migration to the
new CMake/Python3 build layout, using the existing pCore and pMolecule CMake
ports as reference patterns.

Environment used for validation
-------------------------------
- Python interpreter: /opt/miniconda3/envs/hpc/bin/python3.10
- Build/test environment: conda env hpc

Files added
-----------
1. pBabel-2.0.0/CMakeLists.txt
   - Added a dedicated pBabel CMake entry point.
   - Copies pBabel Python sources into build/python/pBabel.
   - Wires pBabel extension builds.
   - Registers pBabel import smoke tests.

2. pBabel-2.0.0/cmake/LoadPBabelLibraries.cmake
   - Added helper logic to build pBabel low-level C libraries from the
     extensions/libraries manifest.

3. pBabel-2.0.0/cmake/LoadPBabelPyx.cmake
   - Added helper logic to resolve .pyx versus generated C sources.
   - Uses Cython when available and falls back to pre-generated C otherwise.

4. pBabel-2.0.0/cmake/LoadPBabelExtensions.cmake
   - Added helper logic to detect and build pBabel extension modules.

5. pBabel-2.0.0/tests/test_import_pbabel.py
   - Added pBabel package import smoke test.

6. pBabel-2.0.0/tests/test_import_all_pbabel_extensions.py
   - Added pBabel extension import smoke test.

Files modified
--------------
1. CMakeLists.txt
   - Added add_subdirectory(pBabel-2.0.0) so pBabel participates in the
     top-level build.

2. pBabel-2.0.0/CMakeLists.txt
   - Wired Python file copy rules into build/python/pBabel.
   - Added pBabel extension build configuration.
   - Added pBabel import tests.
   - Passed pCore and pMolecule C include directories into low-level pBabel
     library configuration so dcBabel can compile against shared headers.

3. pBabel-2.0.0/cmake/LoadPBabelLibraries.cmake
   - Added include paths required by dcBabel:
     - pBabel extensions/cinclude
     - pBabel C source subdirectory
     - pCore extensions/cinclude
     - pMolecule extensions/cinclude

4. pBabel-2.0.0/pBabel/__init__.py
   - Converted local package imports to explicit relative imports for:
     - DCDTrajectoryFileReader
     - DCDTrajectoryFileWriter

5. pBabel-2.0.0/extensions/pyrex/pBabel.DCDTrajectoryFileReader.pyx
   - Converted sibling import to explicit relative import:
     - from .SystemGeometryTrajectory import SystemGeometryTrajectory

6. pBabel-2.0.0/extensions/pyrex/pBabel.DCDTrajectoryFileWriter.pyx
   - Converted sibling import to explicit relative import:
     - from .SystemGeometryTrajectory import SystemGeometryTrajectory

7. pBabel-2.0.0/pBabel/SMILESReader.py
   - Fixed an actual Python 3 incompatibility:
     - replaced string.lower(...) with .lower()
   - This removed the import-time failure:
     - AttributeError: module 'string' has no attribute 'lower'

8. pMolecule-2.0.0/CMakeLists.txt
   - Removed the minimal placeholder __init__.py generation under
     build/python/pMolecule.
   - Allowed the real pMolecule/__init__.py to be copied into the runtime
     package, so pBabel can import symbols such as CrystalClassCubic from
     pMolecule.

Indentation fixes applied
-------------------------
The following files had mixed tab/space indentation that triggered Python 3
TabError. Tabs were treated as width 8 and replaced conservatively so block
structure remained unchanged.

- pBabel-2.0.0/pBabel/CHARMMCRDFileReader.py
- pBabel-2.0.0/pBabel/CHARMMPSFFileReader.py
- pBabel-2.0.0/pBabel/CHARMMParameterFileReader.py
- pBabel-2.0.0/pBabel/CHARMMTopologyFileReader.py
- pBabel-2.0.0/pBabel/EMSLFileReader.py
- pBabel-2.0.0/pBabel/GaussianCubeFileReader.py
- pBabel-2.0.0/pBabel/GromacsCrdFileReader.py
- pBabel-2.0.0/pBabel/GromacsTopologyFileReader.py
- pBabel-2.0.0/pBabel/JaguarInputFileReader.py
- pBabel-2.0.0/pBabel/JaguarOutputFileReader.py
- pBabel-2.0.0/pBabel/MOL2FileReader.py
- pBabel-2.0.0/pBabel/MOLFileReader.py
- pBabel-2.0.0/pBabel/MopacInputFileReader.py
- pBabel-2.0.0/pBabel/OOGLOffFileReader.py
- pBabel-2.0.0/pBabel/ORCAOutputFileReader.py
- pBabel-2.0.0/pBabel/PDBFileReader.py
- pBabel-2.0.0/pBabel/SMILESReader.py
- pBabel-2.0.0/pBabel/XYZFileReader.py
- pBabel-2.0.0/pBabel/fDynamoCRDFileReader.py

Likely Python 2 to 3 issues observed
------------------------------------
- Confirmed and fixed:
  - SMILESReader.py used string.lower(...), which is invalid in Python 3.

- Observed but not changed because they were not blocking this migration path:
  - Some legacy string module usage remains in SMILESReader.py
    (for example string.join and string.digits usage patterns).
  - Cython emitted deprecation warnings about dotted .pyx/.pxd filenames during
    build. These are warnings, not current build blockers.

Validation performed
--------------------
1. Python compile check
   - python -m compileall -q pBabel-2.0.0/pBabel

2. Build
   - cmake -S . -B build
   - cmake --build build -j

3. Targeted pBabel tests
   - ctest --test-dir build -R test_import_pbabel --output-on-failure
   - ctest --test-dir build -R test_import_all_pbabel_extensions --output-on-failure

4. Full configured test set
   - ctest --test-dir build --output-on-failure

Final status
------------
- pBabel CMake integration completed.
- pBabel extensions built successfully.
- pBabel import tests passed.
- Full configured CTest suite passed: 6/6 tests.
