Skip to main content
. 2023 Jul 19;24(14):11671. doi: 10.3390/ijms241411671
Algorithm 1. MD-ligand-receptor; The pseudocode describes the steps implemented in the pipeline.
Require: (topology, trajectory); Files describing the MD
Require: (start, end); Positive time interval T (ps)
Require: time limit; Set time limit for program execution
1: Procedure MD-ligand-receptor(topology, trajectory, start, end, time limit)
2: #Initial stage
3: comm = MPI.init() # spawns MPI processes
4: rank = comm.Get_rank()  # gets MPI process id
5: t_start, t_end = comm.Scatter(start, end) # process obtains t′ from time interval T
6: N_PDB ← 100     # fixes PDB number per iteration
7: interaction_table ← dict()
8: time ← 0
9: sub_t_startt_start # initializes partial time interval sub_t for first iteration
10:  sub_t_endsub_t_start + N_PDB # sets end of sub_t interval
11:  #Second stage
12:  while time < time_limit and sub_t_startt_end do   # iterates until all of t′ is covered
13:  if sub_t_end > t_end then
14:    sub_t_end = t_end
15: end if
16: gmx_trjconv(sub_t_start, sub_t_end) # splits the sub time interval in pdb files
17: #Third stage
18: for pdb_file in directory do
19:  plip_analysis = PLIP(pdb_file) # generates the xml file with interaction data
20:  interaction_table = parse_xml(plip_analysis) # extracts interactions from xml
21:   end for
22:   remove(pdb_file, plip_analysis) # deletes produced files to free disk space
23:   sub_t_start += N_PDB # updates sub_t_start for the next iteration
24:    sub_t_end = sub_t_start + N_PDB
25:    time = timer()
26: end while
27: #Final stage
28: interaction_table = comm.Gather(interaction_table) # gathers the final result
29: if rank == 0 then # the leader process merges all the interactions data
30:    merge_tables(interaction_table)
31: end if
32: end procedure