DMUG-Archiv 2026

Frühere   Chronologischer Index   Spätere
Vorherige   Thematischer Index   Nächste

Re: [Dmug] Überschreiben einer Funktion

Moin moin Peter,

mit diesen Funktionen bist Du nicht zufrieden?

In[49]:= IsotopeData["Thallium", "Symbol"]
Out[49]= {Row[{Row[{"", 176}], "Tl"}], Row[{Row[{"", 177}], "Tl"}],
 Row[{Row[{"", 178}], "Tl"}], Row[{Row[{"", 179}], "Tl"}],
 Row[{Row[{"", 180}], "Tl"}], Row[{Row[{"", 181}], "Tl"}],
 Row[{Row[{"", 182}], "Tl"}], Row[{Row[{"", 183}], "Tl"}],
 Row[{Row[{"", 184}], "Tl"}], Row[{Row[{"", 185}], "Tl"}],
 Row[{Row[{"", 186}], "Tl"}], Row[{Row[{"", 187}], "Tl"}],
 Row[{Row[{"", 188}], "Tl"}], Row[{Row[{"", 189}], "Tl"}],
 Row[{Row[{"", 190}], "Tl"}], Row[{Row[{"", 191}], "Tl"}],
 Row[{Row[{"", 192}], "Tl"}], Row[{Row[{"", 193}], "Tl"}],
 Row[{Row[{"", 194}], "Tl"}], Row[{Row[{"", 195}], "Tl"}],
 Row[{Row[{"", 196}], "Tl"}], Row[{Row[{"", 197}], "Tl"}],
 Row[{Row[{"", 198}], "Tl"}], Row[{Row[{"", 199}], "Tl"}],
 Row[{Row[{"", 200}], "Tl"}], Row[{Row[{"", 201}], "Tl"}],
 Row[{Row[{"", 202}], "Tl"}], Row[{Row[{"", 203}], "Tl"}],
 Row[{Row[{"", 204}], "Tl"}], Row[{Row[{"", 205}], "Tl"}],
 Row[{Row[{"", 206}], "Tl"}], Row[{Row[{"", 207}], "Tl"}],
 Row[{Row[{"", 208}], "Tl"}], Row[{Row[{"", 209}], "Tl"}],
 Row[{Row[{"", 210}], "Tl"}], Row[{Row[{"", 211}], "Tl"}],
 Row[{Row[{"", 212}], "Tl"}], Row[{Row[{"", 213}], "Tl"}],
 Row[{Row[{"", 214}], "Tl"}], Row[{Row[{"", 215}], "Tl"}],
 Row[{Row[{"", 216}], "Tl"}], Row[{Row[{"", 217}], "Tl"}],
 Row[{Row[{"", 218}], "Tl"}]}

In[55]:= IsotopeData[{81, 182}, "Symbol"]
Out[55]= Row[{Row[{"", 182}], "Tl"}]

es erscheint die 182 dem chem. Symbol Tl links oben vorangestellt. Wenn nicht anders, kann daraus eine Labelwörterbuch bauen, dass es Tl182 wird.


grüsse

Udo.


In[56]:= $Version
Out[56]= "14.3.0 for Microsoft Windows (64-bit) (July 8, 2025)"

On 1/25/2026 5:41 PM, Peter Klamser via demug wrote:
Ein Teil des Codes wurde aus der folgenden Quelle übernommen:
https://community.wolfram.com/groups/-/m/t/1733124\[AliasDelimiter]

Warum kann ich die VertexEdges nicht vom Format (Beispiel) „Uran-235” in
„U235” ändern? Dazu habe ich den Block convert$isotop$name[name$string]
geschrieben, den ich gerne

Die VertexLabels -> makeVertexLabels[isotope] in RelationGraph sind
nutzlos. Wenn ich die VertexLabels lösche, ändert sich nichts.

Ich möchte also die Ausgabe des Namens des Isotops ändern, ähnlich wie das
in

https://mathematica.stackexchange.com/questions/95625/overriding-a-built-in-function-with-custom-coded-procedures

beschrieben wird:

Unprotect[Entity["Isotope", Name_]["Name"]];
Entity["Isotope", Name_]["Name"] /; $override == True :=
   Block[{$override = False},
    convert$isotop$name@Entity["Isotope", Name]["Name"]];
Protect[Entity["Isotope", Name_]["Name"]];

Entity["Isotope", "U235"]["Name"]

Dann bekomme ich nur die Meldung

SetDelayed::write: Tag Entity in
Entity[Isotope,Name_][Name]/;$override==True is Protected.

Leider passiert da nixxxxxxxxxx.

Vielen Dank und freundliche Grüße von Peter

_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html
_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html

Verweise:
Frühere   Chronologischer Index   Spätere
Vorherige   Thematischer Index   Nächste

DMUG DMUG-Archiv, http://www.mathematica.ch/archiv.html