pylelab / USalign

Universal Structure Alignment of Monomeric and Complex Structure of Nucleic Acids and Proteins
https://zhanggroup.org/US-align/
Other
109 stars 24 forks source link

Multiple CPU process #2

Closed sacombs closed 2 years ago

sacombs commented 2 years ago

Is it possible to add multiple cpu support?

kad-ecoli commented 2 years ago

No, it is not that simple. US-align performs iterative alignment-superimposition, where each step depends on the result of the previous step. This means that an alignment cannot be easily parallelized.

May I know why you ask for multiple CPU support? Each US-align alignment only takes far less than 1 second. Are you trying to perform alignments of many structures? If that is the case, there are two approaches to improve the run time.

  1. You can include the -fast option, which will perform a faster but slightly less accurate alignment.
  2. More than half of the running time of CPU is spent on loading the USalign executable. You can shorten the time by loading the executable once for all alignments. For example, if you want to align one structure PDB1.pdb to a list of pdb files at folder/:
    USalign PDB1.pdb -dir2 folder/  filename_list

    Here, filename_list is a text file where each line corresponds to one structure file.

You can combine approach 1 and 2,

sacombs commented 2 years ago

Thanks for the advice!