Move the atomic-model code to image_analysis/structure_refinement/ and WriteModel to writer/
A pure move. ModelValidation, RigidBodyRefine, RigidBodyGPU, ModelFFT, ModelGrid, ModelScaling, ModelMaskGPU, ModelScaleGPU and SigmaA - everything that works on an atomic model - become the JFJochStructureRefinement library, linked by JFJochImageAnalysis. WriteModel (the placed-model mmCIF/PDB writer) goes to writer/ as its own small JFJochModelWriter target, so JFJochWriter, which a writer-only build compiles, does not gain a gemmi dependency. Only include paths and CMake lists change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
This commit is contained in:
1 parent
08ca1d5764
commit
9ad92b6bfe
34 files changed
+73
-69
No files matched your search
@@ -129,5 +129,6 @@ ADD_SUBDIRECTORY(scale_merge)
|
||||
ADD_SUBDIRECTORY(image_preprocessing)
|
||||
ADD_SUBDIRECTORY(azint)
|
||||
ADD_SUBDIRECTORY(roi)
|
||||
ADD_SUBDIRECTORY(structure_refinement)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JFJochImageAnalysis JFJochAzIntEngine JFJochROIIntegration JFJochImagePreprocessing JFJochBraggPrediction JFJochBraggIntegration JFJochLatticeSearch JFJochIndexing JFJochSpotFinding JFJochCommon JFJochGeomRefinement JFJochScaleMerge gemmi)
|
||||
TARGET_LINK_LIBRARIES(JFJochImageAnalysis JFJochAzIntEngine JFJochROIIntegration JFJochImagePreprocessing JFJochBraggPrediction JFJochBraggIntegration JFJochLatticeSearch JFJochIndexing JFJochSpotFinding JFJochCommon JFJochGeomRefinement JFJochScaleMerge JFJochStructureRefinement gemmi)
|
||||
@@ -0,0 +1,16 @@
|
||||
ADD_LIBRARY(JFJochStructureRefinement STATIC
|
||||
ModelFFT.cpp ModelFFT.h
|
||||
ModelGrid.cpp ModelGrid.h
|
||||
ModelScaling.cpp ModelScaling.h
|
||||
ModelValidation.cpp ModelValidation.h
|
||||
RigidBodyRefine.cpp RigidBodyRefine.h
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:RigidBodyGPU.cpp>
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:RigidBodyGPU.cu>
|
||||
RigidBodyGPU.h RigidBodyGPUEngine.h
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:ModelMaskGPU.cu> ModelMaskGPU.h
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:ModelScaleGPU.cu> ModelScaleGPU.h
|
||||
SigmaA.cpp SigmaA.h)
|
||||
|
||||
# JFJochIndexing for CUDAMemHelpers.h and, under CUDA, to put cuFFT (RigidBodyGPU.cu) after these
|
||||
# objects on the link line.
|
||||
TARGET_LINK_LIBRARIES(JFJochStructureRefinement JFJochScaleMerge JFJochIndexing JFJochCommon gemmi fftw3f)
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "gemmi/fail.hpp"
|
||||
|
||||
#include "../common/FFTWPlannerLock.h"
|
||||
#include "../../common/FFTWPlannerLock.h"
|
||||
|
||||
namespace {
|
||||
|
||||
File renamed without changes.
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "gemmi/solmask.hpp" // SolventMasker
|
||||
|
||||
#include "../common/ParallelFor.h"
|
||||
#include "../../common/ParallelFor.h"
|
||||
|
||||
namespace {
|
||||
|
||||
File renamed without changes.
@@ -7,7 +7,7 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "../common/JFJochException.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
#include "../image_analysis/indexing/CUDAMemHelpers.h"
|
||||
#include "../indexing/CUDAMemHelpers.h"
|
||||
|
||||
// The bulk-solvent mask of PutMaskOnGrid() (ModelGrid.h), i.e. gemmi's
|
||||
// SolventMasker(AtomicRadiiSet::Refmac).put_mask_on_grid(), on the GPU. gemmi masks the atoms and then
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "../common/JFJochException.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "RigidBodyGPUEngine.h" // ModelScaleGPUTooFewReflections
|
||||
|
||||
namespace {
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
#include "../image_analysis/indexing/CUDAMemHelpers.h"
|
||||
#include "../indexing/CUDAMemHelpers.h"
|
||||
|
||||
// The rigid body's scale fit on the GPU: what RigidBodyTarget::Residuals does with a gemmi
|
||||
// Scaling<float> (use_solvent, k_sol and b_sol fixed) - fit_isotropic_b_approximately() followed by
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#include "../common/ParallelFor.h"
|
||||
#include "../../common/ParallelFor.h"
|
||||
|
||||
namespace {
|
||||
|
||||
File renamed without changes.
+6
-6
@@ -29,17 +29,17 @@
|
||||
#include <gemmi/ccp4.hpp> // Ccp4 map I/O
|
||||
#include <gemmi/mtz.hpp> // Mtz (map-coefficient output)
|
||||
|
||||
#include "../common/CorrelationCoefficient.h"
|
||||
#include "../common/JFJochMath.h" // PI (M_PI is not standard, and MSVC does not define it)
|
||||
#include "../common/Logger.h"
|
||||
#include "../image_analysis/scale_merge/ReindexAmbiguity.h" // ReindexReflections
|
||||
#include "../image_analysis/scale_merge/CrystalSetting.h" // CellMappingOperators
|
||||
#include "../../common/CorrelationCoefficient.h"
|
||||
#include "../../common/JFJochMath.h" // PI (M_PI is not standard, and MSVC does not define it)
|
||||
#include "../../common/Logger.h"
|
||||
#include "../scale_merge/ReindexAmbiguity.h" // ReindexReflections
|
||||
#include "../scale_merge/CrystalSetting.h" // CellMappingOperators
|
||||
#include "ModelFFT.h"
|
||||
#include "RigidBodyRefine.h"
|
||||
#include "SigmaA.h"
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
#include "RigidBodyGPU.h"
|
||||
#include "../common/CUDAWrapper.h"
|
||||
#include "../../common/CUDAWrapper.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "gemmi/symmetry.hpp"
|
||||
|
||||
#include "../common/Reflection.h" // MergedReflection
|
||||
#include "../common/UnitCell.h"
|
||||
#include "../../common/Reflection.h" // MergedReflection
|
||||
#include "../../common/UnitCell.h"
|
||||
|
||||
class Logger;
|
||||
namespace gemmi { struct Structure; }
|
||||
@@ -185,7 +185,7 @@ struct ModelValidationResult {
|
||||
// The model as it was scored: re-fractionalized into the data cell and moved by the rigid-body
|
||||
// step, everything else exactly as it was read. Null where the validation did not run. The frame
|
||||
// it is written in is only settled by AdoptModelFrame below, so it is the caller that puts it on
|
||||
// disk, with WritePlacedModel (WriteModel.h).
|
||||
// disk, with WritePlacedModel (writer/WriteModel.h).
|
||||
std::shared_ptr<gemmi::Structure> placed_model;
|
||||
};
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
#include "ModelScaling.h" // FitModelScale
|
||||
#include "RigidBodyGPUEngine.h"
|
||||
#include "../common/CUDAWrapper.h"
|
||||
#include "../common/JFJochException.h"
|
||||
#include "../common/Logger.h"
|
||||
#include "../../common/CUDAWrapper.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../../common/Logger.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
#include "ModelMaskGPU.h"
|
||||
#include "ModelScaleGPU.h"
|
||||
#include "../common/JFJochException.h"
|
||||
#include "../image_analysis/indexing/CUDAMemHelpers.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../indexing/CUDAMemHelpers.h"
|
||||
|
||||
// Every kernel below is deterministic: nothing is summed with a floating-point atomic, each grid point
|
||||
// adds its atoms in model order, and every reduction runs in a fixed order. The same placement gives the
|
||||
File renamed without changes.
File renamed without changes.
+3
-3
@@ -26,9 +26,9 @@
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
#include "RigidBodyGPU.h" // RigidBodyTargetGPU
|
||||
#endif
|
||||
#include "../common/JFJochMath.h" // PI
|
||||
#include "../common/ParallelFor.h"
|
||||
#include "../common/Logger.h"
|
||||
#include "../../common/JFJochMath.h" // PI
|
||||
#include "../../common/ParallelFor.h"
|
||||
#include "../../common/Logger.h"
|
||||
|
||||
namespace {
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-21
@@ -8,22 +8,6 @@ ADD_LIBRARY(JFJochRugnux STATIC
|
||||
Rugnux.h
|
||||
RugnuxCommandLine.cpp
|
||||
RugnuxCommandLine.h
|
||||
ModelFFT.cpp
|
||||
ModelFFT.h
|
||||
ModelGrid.cpp
|
||||
ModelGrid.h
|
||||
ModelScaling.cpp
|
||||
ModelScaling.h
|
||||
ModelValidation.cpp
|
||||
ModelValidation.h
|
||||
RigidBodyRefine.cpp
|
||||
RigidBodyRefine.h
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:RigidBodyGPU.cpp>
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:RigidBodyGPU.cu>
|
||||
RigidBodyGPU.h
|
||||
RigidBodyGPUEngine.h
|
||||
SigmaA.cpp
|
||||
SigmaA.h
|
||||
ResultReport.cpp
|
||||
ResultReport.h
|
||||
ReportDocument.h
|
||||
@@ -31,17 +15,13 @@ ADD_LIBRARY(JFJochRugnux STATIC
|
||||
LeftoverLattices.h
|
||||
SpotWidth.cpp
|
||||
SpotWidth.h
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:ModelMaskGPU.cu>
|
||||
$<$<BOOL:${JFJOCH_CUDA_AVAILABLE}>:ModelScaleGPU.cu>
|
||||
DiagnosticOutput.cpp
|
||||
DiagnosticOutput.h
|
||||
SpindleCuspLoss.cpp
|
||||
SpindleCuspLoss.h
|
||||
WriteModel.cpp
|
||||
WriteModel.h
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JFJochRugnux JFJochReader JFJochImageAnalysis JFJochWriter JFJochPreview gemmi fftw3f)
|
||||
TARGET_LINK_LIBRARIES(JFJochRugnux JFJochReader JFJochImageAnalysis JFJochWriter JFJochModelWriter JFJochPreview gemmi fftw3f)
|
||||
|
||||
# rugnux is the single offline analysis CLI; --mode picks what it does: mx (the full pipeline, the
|
||||
# default), azint, scale (re-scale/merge stored reflections) or calibration (powder-ring geometry).
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include "Rugnux.h"
|
||||
#include "ModelValidation.h"
|
||||
#include "WriteModel.h"
|
||||
#include "../image_analysis/structure_refinement/ModelValidation.h"
|
||||
#include "../writer/WriteModel.h"
|
||||
#include "SpindleCuspLoss.h"
|
||||
#include "SpotWidth.h"
|
||||
#include "../image_analysis/bragg_integration/SpotFootprint.h"
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#include "../image_analysis/scale_merge/CentreOfSymmetry.h" // CentreOfSymmetryResult
|
||||
#include "../image_analysis/scale_merge/TranslationalNCS.h" // TranslationalNCSResult
|
||||
#include "../image_analysis/indexing/HarmonicContamination.h" // HarmonicContaminationResult
|
||||
#include "ModelValidation.h" // ModelValidationResult
|
||||
#include "../image_analysis/structure_refinement/ModelValidation.h" // ModelValidationResult
|
||||
#include "LeftoverLattices.h" // LeftoverLatticeCensus
|
||||
#include "ReportDocument.h" // ReportWarning, PathologyCode
|
||||
#include "../image_analysis/scale_merge/SearchSpaceGroup.h" // SearchSpaceGroupResult
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
#include "../image_analysis/scale_merge/SearchSpaceGroup.h"
|
||||
#include "Rugnux.h"
|
||||
#include "RugnuxDefaults.h"
|
||||
#include "ModelValidation.h"
|
||||
#include "WriteModel.h"
|
||||
#include "../image_analysis/structure_refinement/ModelValidation.h"
|
||||
#include "../writer/WriteModel.h"
|
||||
#include "ResultReport.h"
|
||||
#include "RugnuxConsole.h"
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ ADD_EXECUTABLE(jfjoch_test
|
||||
)
|
||||
|
||||
target_link_libraries(jfjoch_test Catch2WithMain JFJochBroker JFJochReceiver JFJochReader JFJochStreamWriter
|
||||
JFJochRugnux JFJochImageAnalysis JFJochCommon JFJochHLSSimulation JFJochPreview
|
||||
JFJochRugnux JFJochModelWriter JFJochImageAnalysis JFJochCommon JFJochHLSSimulation JFJochPreview
|
||||
jfjoch_xds_plugin ZLIB::ZLIB httplib::httplib)
|
||||
target_include_directories(jfjoch_test PRIVATE .)
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include <gemmi/solmask.hpp>
|
||||
#include <gemmi/symmetry.hpp>
|
||||
|
||||
#include "../rugnux/ModelGrid.h"
|
||||
#include "../rugnux/ModelMaskGPU.h"
|
||||
#include "../image_analysis/structure_refinement/ModelGrid.h"
|
||||
#include "../image_analysis/structure_refinement/ModelMaskGPU.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
#include "gemmi/unitcell.hpp"
|
||||
|
||||
#include "../common/Logger.h"
|
||||
#include "../rugnux/ModelFFT.h"
|
||||
#include "../rugnux/ModelGrid.h"
|
||||
#include "../rugnux/ModelScaling.h"
|
||||
#include "../rugnux/ModelScaleGPU.h"
|
||||
#include "../rugnux/ModelValidation.h"
|
||||
#include "../rugnux/RigidBodyRefine.h"
|
||||
#include "../image_analysis/structure_refinement/ModelFFT.h"
|
||||
#include "../image_analysis/structure_refinement/ModelGrid.h"
|
||||
#include "../image_analysis/structure_refinement/ModelScaling.h"
|
||||
#include "../image_analysis/structure_refinement/ModelScaleGPU.h"
|
||||
#include "../image_analysis/structure_refinement/ModelValidation.h"
|
||||
#include "../image_analysis/structure_refinement/RigidBodyRefine.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <algorithm>
|
||||
#include <complex>
|
||||
|
||||
#include "../rugnux/ModelScaling.h"
|
||||
#include "../image_analysis/structure_refinement/ModelScaling.h"
|
||||
#include "gemmi/scaling.hpp"
|
||||
#include "gemmi/symmetry.hpp"
|
||||
#include "gemmi/unitcell.hpp"
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
#include <gemmi/solmask.hpp>
|
||||
|
||||
#include "../common/Logger.h"
|
||||
#include "../rugnux/ModelFFT.h"
|
||||
#include "../rugnux/ModelGrid.h"
|
||||
#include "../rugnux/ModelValidation.h"
|
||||
#include "../rugnux/RigidBodyRefine.h"
|
||||
#include "../image_analysis/structure_refinement/ModelFFT.h"
|
||||
#include "../image_analysis/structure_refinement/ModelGrid.h"
|
||||
#include "../image_analysis/structure_refinement/ModelValidation.h"
|
||||
#include "../image_analysis/structure_refinement/RigidBodyRefine.h"
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
#include "../rugnux/RigidBodyGPU.h"
|
||||
#include "../rugnux/RigidBodyGPUEngine.h"
|
||||
#include "../image_analysis/structure_refinement/RigidBodyGPU.h"
|
||||
#include "../image_analysis/structure_refinement/RigidBodyGPUEngine.h"
|
||||
#include "../common/CUDAWrapper.h"
|
||||
#endif
|
||||
#include "../rugnux/SigmaA.h"
|
||||
#include "../rugnux/WriteModel.h"
|
||||
#include "../image_analysis/structure_refinement/SigmaA.h"
|
||||
#include "../writer/WriteModel.h"
|
||||
#include "../image_analysis/scale_merge/ReindexAmbiguity.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -33,6 +33,13 @@ ADD_LIBRARY(JFJochWriter STATIC
|
||||
|
||||
TARGET_LINK_LIBRARIES(JFJochWriter JFJochPreview JFJochLogger JFJochHDF5Wrappers CBORStream2FrameSerialize)
|
||||
|
||||
# The placed atomic model (mmCIF/PDB) that rugnux writes beside its merged output. Its own target,
|
||||
# because it needs gemmi, which JFJochWriter does not link and a writer-only build does not want.
|
||||
IF (NOT JFJOCH_WRITER_ONLY)
|
||||
ADD_LIBRARY(JFJochModelWriter STATIC WriteModel.cpp WriteModel.h)
|
||||
TARGET_LINK_LIBRARIES(JFJochModelWriter JFJochLogger gemmi)
|
||||
ENDIF()
|
||||
|
||||
# The streaming writer and the jfjoch_writer service belong to the Linux server stack, not the
|
||||
# portable viewer subset: JFJochStreamWriter pulls in JFJochImagePuller (not built in a viewer-only
|
||||
# tree) and jfjoch_writer uses a fork()/waitpid() multi-process design (<sys/wait.h>, no Windows
|
||||
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user