@@ -782,32 +782,37 @@ This function can be used to update the system geometry in iterative schemes.
782
782
783
783
# Example
784
784
785
- ```julia-repl
786
- julia> using CellListMap, StaticArrays
785
+ Here we initialize a particle system with a cutoff of `8.0` and then update
786
+ the cutoff to `10.0`.
787
+
788
+ ```jldoctest ; filter = r"batches.*" => ""
789
+ julia> using CellListMap, PDBTools
790
+
791
+ julia> x = coor(readPDB(CellListMap.argon_pdb_file));
787
792
788
793
julia> sys = ParticleSystem(
789
- xpositions = rand(SVector{3,Float64},1000) ,
790
- unitcell=[1,1,1 ],
791
- cutoff = 0.1 ,
794
+ xpositions = x ,
795
+ unitcell=[21.0,21.0,21.0 ],
796
+ cutoff = 8.0 ,
792
797
output = 0.0
793
- );
798
+ );
794
799
795
- julia> update_cutoff!(sys, 0.2 )
796
- ParticleSystem1 of dimension 3, composed of:
800
+ julia> update_cutoff!(sys, 10.0 )
801
+ ParticleSystem1{output} of dimension 3, composed of:
797
802
Box{OrthorhombicCell, 3}
798
- unit cell matrix = [ 1.0, 0.0, 0.0; 0.0, 1.0, 0.0; 0.0, 0.0, 1 .0 ]
799
- cutoff = 0.2
800
- number of computing cells on each dimension = [7, 7, 7 ]
801
- computing cell sizes = [0.2, 0.2, 0.2 ] (lcell: 1)
802
- Total number of cells = 343
803
- CellListMap. CellList{3, Float64}
804
- 1000 real particles.
805
- 620 cells with real particles.
806
- 1746 particles in computing box, including images.
807
- Parallelization auxiliary data set for:
803
+ unit cell matrix = [ 21.0 0.0 0.0; 0.0 21.0 0.0; 0.0 0.0 21 .0 ]
804
+ cutoff = 10.0
805
+ number of computing cells on each dimension = [5, 5, 5 ]
806
+ computing cell sizes = [10.5, 10.5, 10.5 ] (lcell: 1)
807
+ Total number of cells = 125
808
+ CellList{3, Float64}
809
+ 100 real particles.
810
+ 8 cells with real particles.
811
+ 800 particles in computing box, including images.
812
+ Parallelization auxiliary data set for:
808
813
Number of batches for cell list construction: 8
809
- Number of batches for function mapping: 12
810
- Type of output variable: Float64
814
+ Number of batches for function mapping: 8
815
+ Type of output variable (output) : Float64
811
816
```
812
817
"""
813
818
function update_cutoff! (sys:: ParticleSystem1 , cutoff)
0 commit comments