You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/scream-core/src/workflows/place.rs
+30-5Lines changed: 30 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ use crate::engine::utils::query;
19
19
use rand::prelude::IteratorRandom;
20
20
use rand::{Rng, seq::SliceRandom, thread_rng};
21
21
use std::collections::{HashMap,HashSet};
22
-
use tracing::{info, instrument};
22
+
use tracing::{debug,info, instrument};
23
23
24
24
constCLASH_THRESHOLD_KCAL_MOL:f64 = 25.0;
25
25
@@ -42,7 +42,7 @@ pub struct PlacementResult {
42
42
/// into a set of optimized, low-energy solutions.
43
43
///
44
44
/// The workflow follows the multi-stage algorithm described in the original SCREAM paper:
45
-
/// 1. **Preparation**: Loads all necessary resources (forcefield, rotamers) and identifies active residues.
45
+
/// 1. **Preparation**: Loads all necessary resources (forcefield, rotamers), identifies active residues, and excludes disulfide-bonded cysteines from optimization.
46
46
/// 2. **Pre-computation**: Calculates the Empty Lattice (EL) energy for every possible rotamer of every active residue.
47
47
/// 3. **Initialization**: Creates an initial "ground state" conformation by selecting the lowest EL-energy rotamer for each residue.
48
48
/// 4. **Clash Resolution**: Iteratively identifies and resolves the worst energetic clashes using doublet optimization.
@@ -196,7 +196,8 @@ pub fn run(
196
196
/// Prepares the optimization context by resolving active residues from the configuration.
197
197
///
198
198
/// This function determines which residues will be optimized based on the user's selection
199
-
/// criteria and ensures the rotamer library contains appropriate conformations.
199
+
/// criteria, ensures the rotamer library contains appropriate conformations, and automatically
200
+
/// excludes any cysteine residues that are part of disulfide bonds to prevent invalid structures.
200
201
///
201
202
/// # Arguments
202
203
///
@@ -206,7 +207,7 @@ pub fn run(
206
207
///
207
208
/// # Return
208
209
///
209
-
/// A set of residue IDs that will be optimized.
210
+
/// A set of residue IDs that will be optimized, with disulfide-bonded cysteines excluded.
210
211
///
211
212
/// # Errors
212
213
///
@@ -216,11 +217,35 @@ fn prepare_context(
216
217
config:&PlacementConfig,
217
218
rotamer_library:&mutRotamerLibrary,
218
219
) -> Result<HashSet<ResidueId>,EngineError>{
219
-
let active_residues = query::resolve_selection_to_ids(
0 commit comments