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

Peter Bjerre Jensen pbjen at dtu.dk
Fri Oct 24 13:05:07 CEST 2014


Hi Tristan

I have pasted the full output of "ase-db fcc_alloys.db -c+hof,raw_score 
-s raw_score --limit 0" below.

As you can see the first 180 structures do not have a defined raw_score, 
and are therefore shown first (I am not sure whether this is the 
preferred result - when sorting you are normally only interested in the 
entries with a value for the parameter you sort after?)

So the sorting seems be correct (except the issue regarding not defined 
parameters).

But normally one would be interested in the structures with the highest 
value of a sorted parameter, and therefore I think this should be shown 
as standard.

I hope this made it more clear?

Best regards
Peter

The full output is this:

      id|age|user |formula |pbc|volume|   mass| hof|raw_score
       1|15m|pbjen|        |---| 1.000|  0.000|      |
       2|15m|pbjen|AgAl2Pt |---| 1.000|356.911|      |
       3|15m|pbjen|Ag3Cu   |---| 1.000|387.150|      |
       4|15m|pbjen|AgAlAuCu|---| 1.000|395.362|      |
       5|15m|pbjen|AgAlAuPd|---| 1.000|438.236|      |
       6|15m|pbjen|Ag2AuPt |---| 1.000|607.783|      |
       7|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
       8|15m|pbjen|AgNiPdPt|---| 1.000|468.061|      |
       9|15m|pbjen|NiPt3   |---| 1.000|643.933|      |
      10|15m|pbjen|AuCuPd2 |---| 1.000|473.353|      |
      11|15m|pbjen|AgNiPt2 |---| 1.000|556.721|      |
      22|15m|pbjen|AgAuNiPt|---| 1.000|558.608|      |
      24|15m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
      26|15m|pbjen|CuPt3   |---| 1.000|648.786|      |
      28|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
      30|15m|pbjen|AgCuNiPt|---| 1.000|425.187|      |
      32|15m|pbjen|Al2Pt2  |---| 1.000|444.123|      |
      34|15m|pbjen|Au2Pd2  |---| 1.000|606.773|      |
      36|15m|pbjen|AgPt3   |---| 1.000|693.108|      |
      38|15m|pbjen|AlPt3   |---| 1.000|612.222|      |
      40|15m|pbjen|AlAuCuPd|---| 1.000|393.914|      |
      42|15m|pbjen|Ag2AlAu |---| 1.000|439.684|      |
      44|15m|pbjen|AgCuNi2 |---| 1.000|288.801|      |
      46|15m|pbjen|NiPt3   |---| 1.000|643.933|      |
      48|15m|pbjen|Cu2Pd2  |---| 1.000|339.932|      |
      50|15m|pbjen|CuNiPdPt|---| 1.000|423.739|      |
      52|15m|pbjen|AgAuCuPd|---| 1.000|474.800|      |
      54|15m|pbjen|AuNiPd2 |---| 1.000|468.500|      |
      56|15m|pbjen|NiPt3   |---| 1.000|643.933|      |
      58|15m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
      60|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
      62|15m|pbjen|Pt4     |---| 1.000|780.320|      |
      64|15m|pbjen|CuPt3   |---| 1.000|648.786|      |
      66|15m|pbjen|AlCuNiPt|---| 1.000|344.301|      |
      68|15m|pbjen|AgAlPdPt|---| 1.000|436.350|      |
      70|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
      72|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
      74|15m|pbjen|Cu2Pt2  |---| 1.000|517.252|      |
      76|15m|pbjen|CuNiPdPt|---| 1.000|423.739|      |
      78|15m|pbjen|CuPt3   |---| 1.000|648.786|      |
      80|15m|pbjen|AgAlAu2 |---| 1.000|528.783|      |
      82|15m|pbjen|CuPdPt2 |---| 1.000|560.126|      |
      84|15m|pbjen|CuNiPdPt|---| 1.000|423.739|      |
      86|15m|pbjen|AlCuPt2 |---| 1.000|480.688|      |
      88|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
      90|15m|pbjen|Ni2Pt2  |---| 1.000|507.547|      |
      92|15m|pbjen|AuNi2Pt |---| 1.000|509.433|      |
      94|15m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
      96|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
      98|15m|pbjen|CuPt3   |---| 1.000|648.786|      |
    100|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
    102|15m|pbjen|AuCuNiPt|---| 1.000|514.286|      |
    104|15m|pbjen|AuCu2Pt |---| 1.000|519.139|      |
    106|15m|pbjen|AgNiPt2 |---| 1.000|556.721|      |
    108|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
    110|15m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
    112|15m|pbjen|AgCuNi2 |---| 1.000|288.801|      |
    114|15m|pbjen|AgNi2Pt |---| 1.000|420.335|      |
    116|15m|pbjen|AlCuNiPt|---| 1.000|344.301|      |
    118|14m|pbjen|Cu2PdPt |---| 1.000|428.592|      |
    120|14m|pbjen|AuNiPt2 |---| 1.000|645.820|      |
    122|14m|pbjen|Ni2PdPt |---| 1.000|418.887|      |
    124|14m|pbjen|AuCuPt2 |---| 1.000|650.673|      |
    126|14m|pbjen|Cu2Pt2  |---| 1.000|517.252|      |
    128|14m|pbjen|AlCuNiPt|---| 1.000|344.301|      |
    130|14m|pbjen|AgCuPt2 |---| 1.000|561.574|      |
    132|14m|pbjen|AlCu2Pt |---| 1.000|349.154|      |
    134|14m|pbjen|Cu2NiPt |---| 1.000|380.865|      |
    136|14m|pbjen|AuCu2Pt |---| 1.000|519.139|      |
    138|14m|pbjen|Ni3Pt   |---| 1.000|371.160|      |
    140|14m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
    142|14m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
    144|14m|pbjen|AuCuNiPt|---| 1.000|514.286|      |
    146|14m|pbjen|CuPdPt2 |---| 1.000|560.126|      |
    148|14m|pbjen|AgCuNiPt|---| 1.000|425.187|      |
    150|14m|pbjen|Cu2NiPt |---| 1.000|380.865|      |
    152|14m|pbjen|Ni2Pt2  |---| 1.000|507.547|      |
    154|14m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
    156|14m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
    158|14m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
    160|14m|pbjen|AuNi2Pt |---| 1.000|509.433|      |
    162|14m|pbjen|Cu2NiPt |---| 1.000|380.865|      |
    164|14m|pbjen|Cu3Ni   |---| 1.000|249.331|      |
    166|14m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
    168|14m|pbjen|AgNi2Pt |---| 1.000|420.335|      |
    170|14m|pbjen|CuNiPt2 |---| 1.000|512.399|      |
    172|14m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
    174|14m|pbjen|CuNi2Pt |---| 1.000|376.013|      |
    176|14m|pbjen|AlNi2Pt |---| 1.000|339.448|      |
    178|14m|pbjen|Pt4     |---| 1.000|780.320|      |
    180|14m|pbjen|Cu2Pt2  |---| 1.000|517.252|      |
    177|14m|pbjen|AlNi2Pt |---| 1.000|339.448| 0.136|   -0.136
      45|15m|pbjen|AgCuNi2 |---| 1.000|288.801| 0.105|   -0.105
    113|15m|pbjen|AgCuNi2 |---| 1.000|288.801| 0.105|   -0.105
    129|14m|pbjen|AlCuNiPt|---| 1.000|344.301| 0.098|   -0.098
      67|15m|pbjen|AlCuNiPt|---| 1.000|344.301| 0.098|   -0.098
    117|14m|pbjen|AlCuNiPt|---| 1.000|344.301| 0.098|   -0.098
      23|15m|pbjen|AgAuNiPt|---| 1.000|558.608| 0.064|   -0.064
      18|15m|pbjen|AgNiPdPt|---| 1.000|468.061| 0.055|   -0.055
    115|15m|pbjen|AgNi2Pt |---| 1.000|420.335| 0.054|   -0.054
    169|14m|pbjen|AgNi2Pt |---| 1.000|420.335| 0.054|   -0.054
    133|14m|pbjen|AlCu2Pt |---| 1.000|349.154| 0.052|   -0.052
      55|15m|pbjen|AuNiPd2 |---| 1.000|468.500| 0.047|   -0.047
      39|15m|pbjen|AlPt3   |---| 1.000|612.222| 0.043|   -0.043
      41|15m|pbjen|AlAuCuPd|---| 1.000|393.914| 0.042|   -0.042
      37|15m|pbjen|AgPt3   |---| 1.000|693.108| 0.040|   -0.040
      33|15m|pbjen|Al2Pt2  |---| 1.000|444.123| 0.040|   -0.040
      69|15m|pbjen|AgAlPdPt|---| 1.000|436.350| 0.035|   -0.035
      21|15m|pbjen|AgNiPt2 |---| 1.000|556.721| 0.035|   -0.035
    107|15m|pbjen|AgNiPt2 |---| 1.000|556.721| 0.035|   -0.035
      87|15m|pbjen|AlCuPt2 |---| 1.000|480.688| 0.032|   -0.032
      13|15m|pbjen|Ag3Cu   |---| 1.000|387.150| 0.026|   -0.026
      16|15m|pbjen|Ag2AuPt |---| 1.000|607.783| 0.024|   -0.024
      14|15m|pbjen|AgAlAuCu|---| 1.000|395.362| 0.024|   -0.024
    149|14m|pbjen|AgCuNiPt|---| 1.000|425.187| 0.023|   -0.023
      31|15m|pbjen|AgCuNiPt|---| 1.000|425.187| 0.023|   -0.023
    121|14m|pbjen|AuNiPt2 |---| 1.000|645.820| 0.019|   -0.019
    165|14m|pbjen|Cu3Ni   |---| 1.000|249.331| 0.019|   -0.019
      93|15m|pbjen|AuNi2Pt |---| 1.000|509.433| 0.017|   -0.017
    161|14m|pbjen|AuNi2Pt |---| 1.000|509.433| 0.017|   -0.017
      35|15m|pbjen|Au2Pd2  |---| 1.000|606.773| 0.009|   -0.009
      53|15m|pbjen|AgAuCuPd|---| 1.000|474.800| 0.009|   -0.009
      12|15m|pbjen|AgAl2Pt |---| 1.000|356.911| 0.008|   -0.008
      15|15m|pbjen|AgAlAuPd|---| 1.000|438.236| 0.001|   -0.001
      63|15m|pbjen|Pt4     |---| 1.000|780.320|-0.000|    0.000
    179|14m|pbjen|Pt4     |---| 1.000|780.320|-0.000|    0.000
    103|15m|pbjen|AuCuNiPt|---| 1.000|514.286|-0.003|    0.003
    145|14m|pbjen|AuCuNiPt|---| 1.000|514.286|-0.003|    0.003
      20|15m|pbjen|AuCuPd2 |---| 1.000|473.353|-0.005|    0.005
    131|14m|pbjen|AgCuPt2 |---| 1.000|561.574|-0.007|    0.007
    125|14m|pbjen|AuCuPt2 |---| 1.000|650.673|-0.017|    0.017
      81|15m|pbjen|AgAlAu2 |---| 1.000|528.783|-0.025|    0.025
      43|15m|pbjen|Ag2AlAu |---| 1.000|439.684|-0.030|    0.030
      49|15m|pbjen|Cu2Pd2  |---| 1.000|339.932|-0.032|    0.032
    137|14m|pbjen|AuCu2Pt |---| 1.000|519.139|-0.034|    0.034
    105|15m|pbjen|AuCu2Pt |---| 1.000|519.139|-0.034|    0.034
    123|14m|pbjen|Ni2PdPt |---| 1.000|418.887|-0.042|    0.042
      77|15m|pbjen|CuNiPdPt|---| 1.000|423.739|-0.051|    0.051
      85|15m|pbjen|CuNiPdPt|---| 1.000|423.739|-0.051|    0.051
      51|15m|pbjen|CuNiPdPt|---| 1.000|423.739|-0.051|    0.051
      19|15m|pbjen|NiPt3   |---| 1.000|643.933|-0.056|    0.056
      47|15m|pbjen|NiPt3   |---| 1.000|643.933|-0.056|    0.056
      57|15m|pbjen|NiPt3   |---| 1.000|643.933|-0.056|    0.056
      83|15m|pbjen|CuPdPt2 |---| 1.000|560.126|-0.059|    0.059
    147|14m|pbjen|CuPdPt2 |---| 1.000|560.126|-0.059|    0.059
    119|14m|pbjen|Cu2PdPt |---| 1.000|428.592|-0.072|    0.072
      27|15m|pbjen|CuPt3   |---| 1.000|648.786|-0.073|    0.073
      65|15m|pbjen|CuPt3   |---| 1.000|648.786|-0.073|    0.073
      79|15m|pbjen|CuPt3   |---| 1.000|648.786|-0.073|    0.073
      99|15m|pbjen|CuPt3   |---| 1.000|648.786|-0.073|    0.073
    135|14m|pbjen|Cu2NiPt |---| 1.000|380.865|-0.088|    0.088
    163|14m|pbjen|Cu2NiPt |---| 1.000|380.865|-0.088|    0.088
    151|14m|pbjen|Cu2NiPt |---| 1.000|380.865|-0.088|    0.088
    143|14m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
    155|14m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
    173|14m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
    175|14m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
      25|15m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
      59|15m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
      95|15m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
    157|14m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
    167|14m|pbjen|CuNi2Pt |---| 1.000|376.013|-0.096|    0.096
      29|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      61|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      73|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      89|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      97|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
    159|14m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
    171|14m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      17|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      71|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
    101|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
    109|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
    141|14m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
    111|15m|pbjen|CuNiPt2 |---| 1.000|512.399|-0.101|    0.101
      91|15m|pbjen|Ni2Pt2  |---| 1.000|507.547|-0.107|    0.107
    153|14m|pbjen|Ni2Pt2  |---| 1.000|507.547|-0.107|    0.107
    127|14m|pbjen|Cu2Pt2  |---| 1.000|517.252|-0.110|    0.110
      75|15m|pbjen|Cu2Pt2  |---| 1.000|517.252|-0.110|    0.110
    181|14m|pbjen|Cu2Pt2  |---| 1.000|517.252|-0.110|    0.110
    139|14m|pbjen|Ni3Pt   |---| 1.000|371.160|-0.118|    0.118

Den 24-10-2014 kl. 12:56 skrev Tristan Maxson:
> To be clear,  you are saying that ase-db discards extra results (past 
> the limit) BEFORE sorting rather than after?...This seems like a bug 
> if so.  I will look into it and see if its easily fixable if this is 
> the case.
>
> Thank you,
> Tristan Maxson
>
> On Fri, Oct 24, 2014 at 6:52 AM, Peter Bjerre Jensen <pbjen at dtu.dk 
> <mailto:pbjen at dtu.dk>> wrote:
>
>     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 <tel:%2B45%2045253204>
>     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
>
>
>     _______________________________________________
>     ase-users mailing list
>     ase-users at listserv.fysik.dtu.dk
>     <mailto:ase-users at listserv.fysik.dtu.dk>
>     https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
>


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


More information about the ase-users mailing list