@@ -131,7 +131,7 @@ function get_model(data, i::Int, j::Int)
131131 m = data[key]
132132 if m[" name" ] == " GeneralKG"
133133 rcut = get (m, " rcut" , nothing )
134-
134+
135135 return GeneralKG (m[" epsilon" ], m[" sigma" ], m[" k" ], m[" r0" ];
136136 filter_kwargs (
137137 :rcut => get (m, " rcut" , nothing ),
@@ -146,7 +146,9 @@ function get_model(data, i::Int, j::Int)
146146 elseif m[" name" ] == " LennardJones"
147147 return LennardJones (m[" epsilon" ], m[" sigma" ];
148148 filter_kwargs (
149- :rcut => get (m, " rcut" , nothing ))... )
149+ :rcut => get (m, " rcut" , nothing ),
150+ :shift_potential => get (m, " shift_potential" , true ),
151+ )... )
150152 else
151153 error (" Model $(m[" name" ]) is not implemented" )
152154 return nothing
156158function read_bonds (data, N, format:: Arianna.Format )
157159 selrow = get_selrow (format, N, 1 )
158160 bonds_data = data[N+ selrow: end ]
159-
161+
160162 if length (bonds_data) == 0
161163 error (" No bonds found in the file" )
162164 else
@@ -306,7 +308,7 @@ function formatted_string(num::Real, digits::Integer)
306308end
307309
308310function write_position (io, position, digits:: Int )
309- for position_i in position
311+ for position_i in position
310312 formatted_position_i = formatted_string (position_i, digits)
311313 print (io, " " )
312314 print (io, formatted_position_i)
@@ -360,4 +362,4 @@ function Arianna.store_lastframe(io, system::Molecules, t, format::Arianna.Forma
360362 return nothing
361363end
362364
363- end # module IO
365+ end # module IO
0 commit comments