Skip to content

proposed system enhancements#56

Open
blakemertz wants to merge 4 commits into
forlilab:masterfrom
blakemertz:orthorhombic_box
Open

proposed system enhancements#56
blakemertz wants to merge 4 commits into
forlilab:masterfrom
blakemertz:orthorhombic_box

Conversation

@blakemertz

Copy link
Copy Markdown

Apologies for the delay in pushing these commits and drafting the pull request -- got hung up on a few other things. Proposing the following changes to the codebase:

  1. Ability to choose GPU for multi-GPU systems.
  2. Default to mmCIF file format to gracefully handle systems with >99,999 atoms and >9,999 residues. (PDB file format will not properly handle this which affects analysis downstream.)
  3. Modify analysis.py to allow for multi-trajectory analysis.
  4. Allow for use of orthorhombic periodic boundary conditions to decrease the system size and increase simulation efficiency. (This last modification should probably be tested in a production setting to see if there is an effect on cosolvent behavior under non-cubic PBCs.)

Blake Mertz and others added 4 commits April 9, 2026 14:54
Hardcoded CudaDeviceIndex='0' prevented targeting a specific GPU on
multi-GPU workstations and made concurrent simulation runs impossible.
Adds --gpu_id CLI flag (default 0) and passes it through to
run_simulation() so each process can bind to an independent device.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Standard PDB format overflows at >99,999 atoms and >9,999 residues,
causing MDAnalysis to lose all residue identity and corrupt atom
selections. Switches save_pdb() to app.PDBxFile and updates the
simulation loader to detect .cif vs .pdb by extension for backwards
compatibility with existing topology files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Five bug fixes: cosolvent_names string coercion to list (prevented
IndexError on single-name strings); generate_pymol_session list check
before os.path.isfile (prevented TypeError); auto-discovery of .dx
files when density_files=None; cmd.spectrum defaults to 'all' on empty
selection (prevented PyMOL Empty expression error); VMD script
trajectory type corrected from netcdf to dcd.

Also extends traj_file and statistics_file to accept a list, enabling
combined analysis of replicate runs via MDAnalysis ChainReader and
pd.concat without changes to the rest of the pipeline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_build_box previously computed a single circumradius (max distance from
center to any atom) and used it as the uniform box side, forcing a cube
large enough to contain the protein's circumscribed sphere. For
elongated proteins this wastes substantial solvent volume on the short
axes, increasing atom count by 20-40%.

Now computes an independent width per axis from the bounding-box extent
plus padding: widthX/Y/Z = (maxRange - minRange) + 2*padding. The
periodic box vectors, lowerBound, and upperBound are updated
accordingly. Downstream geometry code (is_in_box, delete_edges_points,
addSolvent) already operates per-axis and requires no changes.

The no-receptor box_size path retains cubic geometry since a scalar
radius is the natural input there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@blakemertz
blakemertz marked this pull request as ready for review April 9, 2026 20:08
@blakemertz

Copy link
Copy Markdown
Author

I may have identified a bug in the changes I made to analysis.py to handle multiple trajectories. My changes assumed an identical atom count across multiple systems and this is almost never the case. Sorting this out today, will get back to you with my updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant