Skip to content

Commit 9cfe1cd

Browse files
committed
Fixed problem of the order of starting positions at the simulation step
1 parent 36ef5d7 commit 9cfe1cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightdock/prep/simulation.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def load_starting_positions(swarms, glowworms, use_anm, anm_rec=DEFAULT_NMODES_R
144144
starting_points_files = sorted(glob.glob(pattern))
145145
if len(starting_points_files) != swarms:
146146
raise LightDockError("The number of initial positions files does not correspond with the number of swarms")
147-
for starting_point_file in starting_points_files:
147+
for swarm_id in range(len(starting_points_files)):
148+
starting_point_file = os.path.join(DEFAULT_POSITIONS_FOLDER, "%s_%d.dat" % (DEFAULT_STARTING_PREFIX, swarm_id))
148149
if not check_starting_file(starting_point_file, glowworms, use_anm, anm_rec, anm_lig):
149150
raise LightDockError("Error reading starting coordinates from file %s" % starting_point_file)
150151
return starting_points_files

0 commit comments

Comments
 (0)