ftherrien / p2ptrans

An algorithm to match crystal structures atom-to-atom
http://p2ptrans.rtfd.io
51 stars 8 forks source link

Cannot track progress after the initial output #15

Closed Srilok closed 4 years ago

Srilok commented 4 years ago

Hey Therrien,

First of all thanks a lot for your contribution and making it available to reuse!

I am trying to match crystal structures but when I run "p2ptrans -I POSCAR.0 -F POSCAR.1" I get the following output which says the progress is shown in progess.txt but there is no output in the progress.txt file (apart from the initial output when I first start the program) even after several hours. I am not sure if p2p is doing any computations or is it just stuck. Any help in this would be greatly appreciated. Please let me know if you need more information or the POSCAR files to diagnose whats going on

Thank you

Srilok

 ________    _______  ________   
|\   __  \  /  ___  \|\   __  \  
\ \  \|\  \/__/|_/  /\ \  \|\  \ 
 \ \   ____\__|//  / /\ \   ____\
  \ \  \___|   /  /_/__\ \  \___|
   \ \__\     |\________\ \__\   
    \|__|      \|_______|\|__|   

__________TRANSFORMATIONS__________

=>Reading crystal analysis parameters<=

Making the cells primitive.
C (POSCAR.0) did not change. It has 4 atoms.
C (POSCAR.1) did not change. It has 8 atoms.

The optimization will be performed in the reversed direction.
Transition is *optimized* from C (POSCAR.1) to C (POSCAR.0)
Initial spacegroup in optimization: Cccm (66)
Final spacegroup in optimization: I4_132 (214)
Number of C (POSCAR.1) cells in sphere: 300
Number of C (POSCAR.0) cells in sphere: 600
Total number of atoms in each sphere: 2400

Optimizing... (this may take several hours)
Check progress in ./progress.txt 

Contents of the progress.txt file

New initial step on thread   4, iteration   376
New initial step on thread   5, iteration   501
New initial step on thread   6, iteration   626
New initial step on thread   7, iteration   751
New initial step on thread   8, iteration   876
New initial step on thread   2, iteration   126
New initial step on thread   1, iteration     1
New initial step on thread   3, iteration   251
ftherrien commented 4 years ago

Hi @Srilok, It seems like there might be nothing wrong! Basically, this line: Total number of atoms in each sphere: 2400 indicates how many atoms will be used for the optimization, it scales to about N^4, so 2400 is, from my experience, very large. It will probably take about 25 hours to complete only 1 iteration on an average CPU.

The good news is that you can easily change the number of cells you want to run the optimization on by specifying it with the -n options. I suggest you start with:

p2ptrans -I POSCAR.0 -F POSCAR.1 -n 30

That should finish in less than 10 min.

-n 30 is the number of primtive cells of the structure that has the most atoms in its unit cell, in your case that is POSCAR.1.

Tip:

In general, you want to choose -n as large as you possibly can, but in practice, when you want to find a plausible or realistic transformation and not necessarly the absolute minimum you need to set -n to a size that is "larger than the largest scale of transformation that you expect to find". For example, in your case, the minimum scale of the transformation is 1 unit cell of POSCAR.1 and I don't imagine that the transformation will occur on a scale of more than 20 times that so I set -n to 30. At the end the algorithm will give you the scale of the transformation, if it is close to 30, than it would be safe to rerun the algorithm with a larger -n.

More info: See the documentation for a tutorial and more info.

I will close the issue since there does not seem to be any actual issue with the code.