> Quoting Miguel <[EMAIL PROTECTED]>: > >> > to be able to display _partial_ charge values >> > as Labels in Jmol (as Atom Name Labels are displayed). >> >> select <set-of-atoms>; >> label "%P"; # show partial charge as the label > > All works pretty good with however one problem: See > http://www.u-picardie.fr/labo/lbpd/jmol-10.00/Test/MeOH.html > With the corresponding CML file converted from a Tripos file: > http://www.u-picardie.fr/labo/lbpd/jmol-10.00/Test/MeOH.cml > > The values of atomic charges have _only_ 4 digits: > <atom id="a6" elementType="H" x3="-1.1399" y3="-1.1399" > z3="0.0000"><scalar > dictRef="jmol:charge">0.4262</scalar></atom> > > But 8 digits are displayed !!! > > Changing the charge value to 0.6666 for this atom in the .cml file > => the 4 digits requested are then displayed... Bizarrrre ;-) > > What is this problem ? A bug ?
No, it is a fact of life. Many rational numbers cannot be represented with fixed precision decimal numbers. 1/3 and 1/7 are simple examples. Similarly, there are many numbers in base 10 whose fractional components cannot be accurately represented in base 2. Find an undergraduate student in computer science and ask them to explain it to you. I will investigate the possibility of providing additional formatting control in the 'label' statement to allow numeric precision specification. Miguel ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users