@@ -1199,17 +1199,25 @@ end
1199
1199
Base. show (io:: IO , :: MIME"text/plain" , s:: Union{System, ReplicaSystem} ) = show (io, s)
1200
1200
1201
1201
"""
1202
- System(abstract_system; force_units=u"kJ * mol^-1 * nm^-1", energy_units=u"kJ * mol^-1" )
1202
+ System(abstract_system; <keyword arguments> )
1203
1203
1204
1204
Convert an AtomsBase `AbstractSystem` to a Molly `System`.
1205
1205
1206
- `force_units` and `energy_units` should be set as appropriate.
1207
- To add properties not present in the AtomsBase interface (e.g. pair potentials) use the
1208
- convenience constructor `System(sys::System)`.
1206
+ The keyword arguments `force_units` and `energy_units` should be set as appropriate.
1207
+ Other keyword arguments are the same as for the main `System` constructor.
1209
1208
"""
1210
1209
function System (sys:: AtomsBase.AbstractSystem{D} ;
1210
+ topology= nothing ,
1211
+ pairwise_inters= (),
1212
+ specific_inter_lists= (),
1213
+ general_inters= (),
1214
+ constraints= (),
1215
+ neighbor_finder= NoNeighborFinder (),
1216
+ loggers= (),
1211
1217
force_units= u " kJ * mol^-1 * nm^-1" ,
1212
- energy_units= u " kJ * mol^-1" ) where D
1218
+ energy_units= u " kJ * mol^-1" ,
1219
+ k= default_k (energy_units),
1220
+ data= nothing ) where D
1213
1221
bb = AtomsBase. cell_vectors (sys)
1214
1222
is_cubic = true
1215
1223
for (i, bv) in enumerate (bb)
@@ -1274,8 +1282,17 @@ function System(sys::AtomsBase.AbstractSystem{D};
1274
1282
boundary= molly_boundary,
1275
1283
velocities= vels,
1276
1284
atoms_data= atoms_data,
1285
+ topology= topology,
1286
+ pairwise_inters= pairwise_inters,
1287
+ specific_inter_lists= specific_inter_lists,
1288
+ general_inters= general_inters,
1289
+ constraints= constraints,
1290
+ neighbor_finder= neighbor_finder,
1291
+ loggers= loggers,
1277
1292
force_units= force_units,
1278
1293
energy_units= energy_units,
1294
+ k= k,
1295
+ data= data,
1279
1296
)
1280
1297
end
1281
1298
0 commit comments