diff --git a/docs/make.jl b/docs/make.jl index 231b0cac..40f2e2a9 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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", diff --git a/docs/src/options.md b/docs/src/options.md index f9c9b8a0..5123c5d3 100644 --- a/docs/src/options.md +++ b/docs/src/options.md @@ -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"] +``` + diff --git a/docs/src/trajectory.md b/docs/src/trajectory.md deleted file mode 100644 index 7198fbf4..00000000 --- a/docs/src/trajectory.md +++ /dev/null @@ -1,30 +0,0 @@ -# [Loading trajectories](@id trajectories) - -To initialize a trajectory file for computation, 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. - -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") - ``` - -## Reference functions - -```@autodocs -Modules = [ComplexMixtures] -Pages = ["Trajectory.jl"] -```