choderalab / fah-xchem

Tools and infrastructure for automated compound discovery using Folding@home
MIT License
6 stars 3 forks source link

Solve issues with snapshot generation in Sprint 12 #175

Open jchodera opened 2 years ago

jchodera commented 2 years ago

I must have broken some aspect of snapshot generation in Sprint 12:

ValueError: xyz must be shape (Any, 9388, 3). You supplied  (4, 9465, 3)
Traceback (most recent call last):
  File "/home/server/fah-xchem-prod/fah-xchem/fah_xchem/analysis/structures.py", line 605, in generate_representative_snapshot
    sliced_snapshots, components = self.extract_snapshot(
  File "/home/server/fah-xchem-prod/fah-xchem/fah_xchem/analysis/structures.py", line 428, in extract_snapshot
    trajectory = self.load_trajectory(
  File "/home/server/fah-xchem-prod/fah-xchem/fah_xchem/analysis/structures.py", line 312, in load_trajectory
    trajectory = md.Trajectory(xyz, topology)
  File "/home/server/miniconda/envs/fah-xchem-prod-2022.01.31/lib/python3.9/site-packages/mdtraj/core/trajectory.py", line 1226, in __init__
    self.xyz = xyz
  File "/home/server/miniconda/envs/fah-xchem-prod-2022.01.31/lib/python3.9/site-packages/mdtraj/core/trajectory.py", line 939, in xyz
    value = ensure_type(value, np.float32, 3, 'xyz', shape=shape,
  File "/home/server/miniconda/envs/fah-xchem-prod-2022.01.31/lib/python3.9/site-packages/mdtraj/utils/validation.py", line 148, in ensure_type
    raise error

The good news is that the solute atoms in core22 0.0.20 are now written in sorted (ascending) atom index order, so this should be straightforward to solve in a manner that reduces complexity.