From 92f6be78833916661df2e8d66ec85bd8a32a999a Mon Sep 17 00:00:00 2001 From: IVinterbladh Date: Thu, 18 Jun 2026 10:07:22 +0200 Subject: [PATCH 1/2] renamed gaussian_atoms.yaml to also include the poly amino acids -> poly_aas+gaussian_atoms.yaml --- assets/{gaussian_atoms.yaml => poly_aas+gaussian_atoms.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename assets/{gaussian_atoms.yaml => poly_aas+gaussian_atoms.yaml} (100%) diff --git a/assets/gaussian_atoms.yaml b/assets/poly_aas+gaussian_atoms.yaml similarity index 100% rename from assets/gaussian_atoms.yaml rename to assets/poly_aas+gaussian_atoms.yaml From a479485269e6b527fa0bb0cd4a408628afb377b1 Mon Sep 17 00:00:00 2001 From: IVinterbladh Date: Thu, 18 Jun 2026 10:18:17 +0200 Subject: [PATCH 2/2] adding missed files from last commit --- README.md | 4 ++-- pripps-py/tests/test_smoke.py | 2 +- scripts/sasbdb_bench.py | 2 +- src/lib.rs | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0532673..a95f61e 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,7 @@ must define it when `--excluded per-kind` is selected. | File | Description | Best for | |------|-------------|----------| | `assets/foxs_formfactors.yaml` | Cromer-Mann (Int. Tables Vol. C) atomic form factors, FoXS-compatible volumes and SASA radii | Atomic PDBs with `--excluded foxs` | -| `assets/gaussian_atoms.yaml` | Mixed table: residue single-bead polynomials plus atomic/united-atom Gaussians (CH/CH₂/NH/…) | Atomic PDBs with PepsiSAXS-style solvent models | +| `assets/poly_aas+gaussian_atoms.yaml` | Mixed table: residue single-bead polynomials plus atomic/united-atom Gaussians (CH/CH₂/NH/…) | Atomic PDBs with PepsiSAXS-style solvent models | | `assets/stovgaard2010.yaml` | Per-residue form-factor centroids (one-body model, q ∈ [0, 0.75] Å⁻¹) from Stovgaard et al. 2010, | Residue / Cα single-bead models | | `assets/poly_amino_acid.yaml` | Amino-acid bead polynomials with a separate `excluded_solvent` polynomial per bead | Cα / single-bead with `--excluded per-kind` | | `assets/poly_amino_acid_combined.yaml` | Amino-acid bead polynomials with the excluded solvent already folded into the form factor | Cα / single-bead with `--excluded disabled` | @@ -254,7 +254,7 @@ their respective tools. **Don't mix files with non-matching `--excluded` flags.** Each YAML + excluded-volume convention is a self-consistent bundle: `foxs_formfactors.yaml` was calibrated jointly with FoXS's -`K = 16π` Gaussian, while `gaussian_atoms.yaml` was calibrated with +`K = 16π` Gaussian, while `poly_aas+gaussian_atoms.yaml` was calibrated with PepsiSAXS's `K = 4π`. Swapping the denominator gives atomic and excluded contributions that were never fit together and yields subtly biased intensities. diff --git a/pripps-py/tests/test_smoke.py b/pripps-py/tests/test_smoke.py index 39f1ac2..842de73 100644 --- a/pripps-py/tests/test_smoke.py +++ b/pripps-py/tests/test_smoke.py @@ -132,7 +132,7 @@ class TestPepsiFit(unittest.TestCase): def setUpClass(cls): cls.exp = load_lyzexp() q_max = float(cls.exp[-1, 0]) - pr = pripps.Pripps("../assets/gaussian_atoms.yaml") + pr = pripps.Pripps("../assets/poly_aas+gaussian_atoms.yaml") cls.model = pr.multipole_model( "../tests/lysozyme/4lzt.pdb", qmin=0.0, diff --git a/scripts/sasbdb_bench.py b/scripts/sasbdb_bench.py index 569529f..070e82a 100755 --- a/scripts/sasbdb_bench.py +++ b/scripts/sasbdb_bench.py @@ -62,7 +62,7 @@ BENCH = REPO / "sasbdb_bench" CACHE = BENCH / "cache" FF_YAML_DEFAULT = REPO / "assets" / "foxs_formfactors.yaml" -# Override via --atomfile if you want gaussian_atoms.yaml for the +# Override via --atomfile if you want poly_aas+gaussian_atoms.yaml for the # PepsiSAXS-style K=4π convention. SASBDB_API = "https://www.sasbdb.org/rest-api/entry/summary/{}/" diff --git a/src/lib.rs b/src/lib.rs index baac710..fd87fcf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -775,7 +775,8 @@ mod tests { // produce a physically reasonable profile. Not as good as // the FoXS pipeline (different coefficients, different // denominator) but the shape should be plausible. - let pripps = Pripps::from_yaml(std::path::Path::new("assets/gaussian_atoms.yaml")).unwrap(); + let pripps = + Pripps::from_yaml(std::path::Path::new("assets/poly_aas+gaussian_atoms.yaml")).unwrap(); let pdb = std::path::PathBuf::from("tests/lysozyme/4lzt.pdb"); let solvent = SolventConfig { excluded: ExcludedVolume::Fraser { volume_scale: 1.0 }, @@ -848,7 +849,7 @@ mod tests { /// rescales it back to a full average (not frame 0 × 1/N_frames). #[test] fn trajectory_stride_and_weights() { - let pripps = Pripps::from_yaml(Path::new("assets/gaussian_atoms.yaml")).unwrap(); + let pripps = Pripps::from_yaml(Path::new("assets/poly_amino_acid.yaml")).unwrap(); let template = std::path::PathBuf::from("tests/lysozyme/4lzt.xyz"); let xtc = std::env::temp_dir().join("pripps_stride_test.xtc"); write_two_frame_xtc(&xtc);