Skip to content

Commit

Permalink
remove warning from precompilation by silencing ResidueContributions
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Oct 17, 2024
1 parent 73cf35e commit 08093f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PrecompileTools.@setup_workload begin
solvent = AtomSelection(tmao, natomspermol = 14)
traj = Trajectory("$dir/trajectory.dcd", solute, solvent)
R = mddf(traj, options)
rc = ResidueContributions(R, prot)
rc = ResidueContributions(R, prot; silent=true)
traj = Trajectory("$dir/trajectory.dcd", solvent)
R = mddf(traj, options)
end
Expand Down
2 changes: 1 addition & 1 deletion src/tools/residue_contributions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function ResidueContributions(
# Each column is then filled up with the contributions of each residue
silent || (p = Progress(length(residues); dt=1))
Threads.@threads for (ichunk, residue_inds) in enumerate(ChunkSplitters.index_chunks(residues; n=Threads.nthreads()))
_warn_zero_md_count = ichunk == 1 ? true : false
_warn_zero_md_count = ichunk == 1 ? (!silent) : false
for ires in residue_inds
rescontrib[:, ires] .= contributions(results, SoluteGroup(residues[ires]); type, _warn_zero_md_count)
_warn_zero_md_count = false
Expand Down

0 comments on commit 08093f6

Please sign in to comment.