Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version: MolSimToolkit v1.24.0 #123817

Merged

Conversation

JuliaRegistrator
Copy link
Contributor

# New feature

The simulation object can be initialized with the `frames` keyword argument, which can be set to a range or a vector of indices of the frames. For example:

```julia-repl
julia> using MolSimToolkit, MolSimToolkit.Testing

julia> sim = Simulation(Testing.namd2_pdb, Testing.namd2_traj; frames=[1,3,5])
Simulation 
    Atom type: PDBTools.Atom{Nothing}
    PDB file: /home/leandro/.julia/dev/MolSimToolkit/test/data/namd/protein_in_water_tmao/structure.pdb
    Trajectory file: /home/leandro/.julia/dev/MolSimToolkit/test/data/namd/protein_in_water_tmao/trajectory.dcd
    Total number of frames: 20
    Frames to consider: 1, 3, 5
    Number of frames to consider: 3
    Current frame: nothing
```

This allows computing properties from any subset of the frames of the simulations. For example, to compute the average dihedral angle of the first two residues of the example file above, only considering the selected frames, one would do, as before:

```julia-repl
julia> using PDBTools

julia> d1 = select(atoms(sim), "residue 1 and backbone");

julia> d2 = select(atoms(sim), "residue 2 and backbone")
   Array{Atoms,1} with 4 atoms with fields:
   index name resname chain   resnum  residue        x        y        z occup  beta model segname index_pdb
      13    N     CYS     A        2        2   -6.351  -14.461   -5.695  1.00  0.00     1    PROT        13
      15   CA     CYS     A        2        2   -5.113  -13.737   -5.466  1.00  0.00     1    PROT        15
      22    C     CYS     A        2        2   -4.610  -13.207   -6.811  1.00  0.00     1    PROT        22
      23    O     CYS     A        2        2   -4.443  -13.972   -7.759  1.00  0.00     1    PROT        23

julia> average_dihedrals(sim, [d1, d2])
2-element Vector{Float64}:
 -13.971039748471016
 -34.44560612678544
```

UUID: 054db54f-6694-444d-9bbb-e9ecdbfe77be
Repo: https://github.com/m3g/MolSimToolkit.jl.git
Tree: c0ce6cb877919d4b18ca15bc7e07e219628ca49a

Registrator tree SHA: 17aec322677d9b81cdd6b9b9236b09a3f1374c6a
Copy link
Contributor

Hello, I am an automated registration bot. I help manage the registration process by checking your registration against a set of AutoMerge guidelines. If all these guidelines are met, this pull request will be merged automatically, completing your registration. It is strongly recommended to follow the guidelines, since otherwise the pull request needs to be manually reviewed and merged by a human.

1. AutoMerge Guidelines are all met! ✅

Your new version registration met all of the guidelines for auto-merging and is scheduled to be merged in the next round (~20 minutes).

2. To pause or stop registration

If you want to prevent this pull request from being auto-merged, simply leave a comment. If you want to post a comment without blocking auto-merging, you must include the text [noblock] in your comment.

Tip: You can edit blocking comments to add [noblock] in order to unblock auto-merging.

@JuliaTagBot JuliaTagBot merged commit e9e0c10 into master Jan 27, 2025
15 checks passed
@JuliaTagBot JuliaTagBot deleted the registrator-molsimtoolkit-054db54f-v1.24.0-263b315714 branch January 27, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants