Skip to content

Commit

Permalink
multitraj.jl: add the example script for processing multiple trajecto…
Browse files Browse the repository at this point in the history
…ries
  • Loading branch information
axsk committed Aug 21, 2024
1 parent 194195f commit 9fad5a9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions scripts/multitraj.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using ISOKANN:
ISOKANN,
load_trajectory,
restricted_localpdistinds,
pdists,
atom_indices,
data_from_trajectory,
lastcat

DATADIR = "/data/numerik/ag_cmd/trajectory_transfers_for_isokann/data/8EF5_500ns_pka_7.4_no_capping_310.10C"
MAXRADIUS = 0.5 # angstrom
STRIDE = 10

trajfiles = ["$DATADIR/traj.dcd" for i in 1:2]
pdbfile = "$DATADIR/struct.pdb"


molecule = load_trajectory(pdbfile, top=pdbfile)
pdist_inds = restricted_localpdistinds(molecule, MAXRADIUS, atom_indices(pdbfile, "not water and name==CA"))


datas = map(trajfiles) do trajfile
traj = load_trajectory(trajfile, top=pdbfile, stride=STRIDE)
feats = pdists(traj, pdist_inds)
data = data_from_trajectory(feats, reverse=true)
end

mergedata(d1, d2) = lastcat.(d1, d2)

data = reduce(mergedata, datas)

iso = Iso2(data)
run!(iso, 1000)

0 comments on commit 9fad5a9

Please sign in to comment.