[ase-users] ase-db output limit and sorting

Peter Bjerre Jensen pbjen at dtu.dk
Fri Oct 24 12:52:06 CEST 2014


Hi

According to the help of ase-db (ase-db --help) one can specify the 
number of entries to show with the keyword limit; however I do not think 
it works very well in combination with the sort function.

For example I have created a database following the ase-ga toturial 
(https://wiki.fysik.dtu.dk/ase/tutorials/ga/ga_fcc_alloys.html ) and 
generated a database where the 5 best structures according to raw_score 
are these:

    id|age|user |formula |pbc|volume|   mass| hof|raw_score
    153|22s|pbjen|Ni2Pt2  |---| 1.000|507.547|-0.107|    0.107
    127|34s|pbjen|Cu2Pt2  |---| 1.000|517.252|-0.110|    0.110
      75|54s|pbjen|Cu2Pt2  |---| 1.000|517.252|-0.110|    0.110
    181| 9s|pbjen|Cu2Pt2  |---| 1.000|517.252|-0.110|    0.110
    139|29s|pbjen|Ni3Pt   |---| 1.000|371.160|-0.118|    0.118

This was obtained by using "ase-db fcc_alloys.db --limit 0 
-c+hof,raw_score -s raw_score" to show all entries and sort by 
raw_score(=-hof); which should be as high as possible for the best 
candidates.

However, if I now do "ase-db fcc_alloys.db --limit 5 -c+hof,raw_score -s 
raw_score" I obtain the top of the list (which are the unrelaxed 
structures from the tutorial with no defined raw_score):

    id| age|user |formula |pbc|volume|   mass|hof|raw_score
      1|248s|pbjen|        |---| 1.000|  0.000|   |
      2|248s|pbjen|AgAl2Pt |---| 1.000|356.911|   |
      3|248s|pbjen|Ag3Cu   |---| 1.000|387.150|   |
      4|247s|pbjen|AgAlAuCu|---| 1.000|395.362|   |
      5|247s|pbjen|AgAlAuPd|---| 1.000|438.236|   |

I think this is very unpractical, and I think it would make most sense 
to show the last entries if one specifies a limit.

I think a simple solution could be to add an extra keyword specifying 
the sorting to be reverse?

Best regards
Peter

Peter Bjerre Jensen
PhD Student
DTU Energy Conversion

Technical University of Denmark

	
Department of Energy Conversion and Storage
Fysikvej, Building 307
2800 Kgs. Lyngby
Direct +45 45253204
pbjen at dtu.dk <mailto:pbjen at dtu.dk>
www.ecs.dtu.dk <http://www.ecs.dtu.dk>


-- 
Peter Bjerre Jensen
Gyngemose Parkvej 6C ST TH
2860 Søborg
Tlf. 21 26 13 90

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20141024/8d2bf417/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DTU_email_logo_01.gif
Type: image/gif
Size: 1055 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20141024/8d2bf417/attachment.gif>


More information about the ase-users mailing list