Skip to content

Commit

Permalink
move Trajectory to minor menu
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Nov 25, 2024
1 parent 9fc3109 commit 79887a2
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 31 deletions.
1 change: 0 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ makedocs(
" ◦ POPC membrane in water/ethanol" => "example3.md",
" ◦ Water/Glycerol mixture" => "example4.md",
"Set solute and solvent" => "selection.md",
"Loading the trajectory" => "trajectory.md",
"Computing the MDDF" => "mddf.md",
"Results" => "results.md",
"Atomic and group contributions" => "contributions.md",
Expand Down
40 changes: 40 additions & 0 deletions docs/src/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,45 @@ Modules = [ComplexMixtures]
Pages = ["Options.jl"]
```

## [Loading trajectories](@id trajectories)

!!! note
This explicit export of the `Trajectory` object is kept mostly
for legacy compatibility (previous to v2.9.0).

To initialize a trajectory file for computation before calling the
`mddf` or `coordination_number` functions, use the command
```julia
trajectory = Trajectory("trajectory.xtc",solute,solvent)
```
where `solute` and `solvent` are defined with the `AtomSelection` function
described [before](@ref selections). This function opens the stream for
reading frames, which are read once a time when the coordinates are
required for computing the MDDF.

This object can be used to feed `mddf` and `coordination_number` with:
```
mddf(trajectory, options)
coordination_number(trajectory, options)
```

The `Trajectory` function uses
[Chemfiles](http://chemfiles.org/Chemfiles.jl/latest/) in background,
and thus the most common trajectory formats are supported, as the ones
produced with NAMD, Gromacs, LAMMPS, Amber, etc.

!!! tip
The format of the trajectory file is automatically determined by
Chemfiles from the extension of the file. However, it can be
provided by the user with the `format` keyword, for example:
```julia
trajectory = Trajectory("trajectory.xtc",solute,solvent,format="xtc")
```

```@autodocs
Modules = [ComplexMixtures]
Pages = ["Trajectory.jl"]
```



30 changes: 0 additions & 30 deletions docs/src/trajectory.md

This file was deleted.

0 comments on commit 79887a2

Please sign in to comment.