Bugs item #831811, was opened at 2003-10-28 18:00
Message generated for change (Comment added) made by egonw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=831811&group_id=23629

Category: File Input/Output
Group: v8
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard P. Muller (rpmuller)
Assigned to: Nobody/Anonymous (nobody)
Summary: CML input of crystals misses some atom images

Initial Comment:
In v8, when inputting a <crystal> record from a CML 
file, not all of the periodic images of atoms on the 
unit cell boundaries are included. This problem only 
occurs when using the unit cell lengths A, B, C and 
angles alpha, beta, and gamma to specify the unit 
cell, NOT when using a 3x3 floatArray to specify the 
unit cell. 
 
The difference can be seen by contrasting these two 
structures. 
 
This one has all of the proper periodic images: 
<?xml version="1.0" ?> 
<cml title="crystal example"> 
<molecule id="Si"> 
  <string title="COMMENT"></string> 
  <crystal> 
   <floatArray convention="PMP" title="a" >5.100 0 
0</floatArray> 
   <floatArray convention="PMP" title="b" >0 5.100 
0</floatArray> 
   <floatArray convention="PMP" title="c" >0 0 
5.100</floatArray> 
  </crystal> 
  <atomArray> 
    <atom id="Si1" elementType="Si" x3="0.0" y3="0.0" 
z3="0.0"/> 
    <atom id="Si2" elementType="Si" x3="2.55" 
y3="2.55" z3="0.0"/> 
    <atom id="Si3" elementType="Si" x3="2.55" 
y3="0.0" z3="2.55"/> 
    <atom id="Si4" elementType="Si" x3="0.0" 
y3="2.55" z3="2.55"/> 
    <atom id="Si5" elementType="Si" x3="1.275" 
y3="1.275" z3="1.275"/> 
    <atom id="Si6" elementType="Si" x3="1.275" 
y3="3.825" z3="3.825"/> 
    <atom id="Si7" elementType="Si" x3="3.825" 
y3="1.275" z3="3.825"/> 
    <atom id="Si8" elementType="Si" x3="3.825" 
y3="3.825" z3="1.275"/> 
  </atomArray> 
</molecule> 
</cml> 
 
Whereas the one which uses the unit cell lengths A, 
B, C and angles alpha, beta, gamma does not have the 
proper images: 
 
<?xml version="1.0" ?> 
<cml title="crystal example"> 
<molecule id="Si"> 
  <string title="COMMENT"></string> 
  <crystal> 
    <scalar title="a">5.1</scalar> 
    <scalar title="b">5.1</scalar> 
    <scalar title="c">5.1</scalar> 
    <scalar title="alpha">90</scalar> 
    <scalar title="beta">90</scalar> 
    <scalar title="gamma">90</scalar> 
  </crystal> 
  <atomArray> 
    <atom id="Si1" elementType="Si" x3="0.0" y3="0.0" 
z3="0.0"/> 
    <atom id="Si2" elementType="Si" x3="2.55" 
y3="2.55" z3="0.0"/> 
    <atom id="Si3" elementType="Si" x3="2.55" 
y3="0.0" z3="2.55"/> 
    <atom id="Si4" elementType="Si" x3="0.0" 
y3="2.55" z3="2.55"/> 
    <atom id="Si5" elementType="Si" x3="1.275" 
y3="1.275" z3="1.275"/> 
    <atom id="Si6" elementType="Si" x3="1.275" 
y3="3.825" z3="3.825"/> 
    <atom id="Si7" elementType="Si" x3="3.825" 
y3="1.275" z3="3.825"/> 
    <atom id="Si8" elementType="Si" x3="3.825" 
y3="3.825" z3="1.275"/> 
  </atomArray> 
</molecule> 
</cml> 
 
It could be that there is some truncation error when 
converting a,b,c,alpha,beta,gamma to the 3x3 matrix 
that results in some of these images being lost. 
 

----------------------------------------------------------------------

>Comment By: Egon Willighagen (egonw)
Date: 2003-10-28 20:40

Message:
Logged In: YES 
user_id=25678

I've just tested them, and the problem indeed seems to be 
truncation errors. The code checks whether something is in the 
unit box... 1x1x1 by default. And it by rounding errors on atoms 
on edges, they might just fall outside... If you make the box 
bigger the reappear... I'll try to make the check it little more 
reasonable by setting the error marge for 'unit cell border' atoms 
to 0.001 angstrom... which is large enough compared with 
rounding errors. If it works, I'll close this bug later this week, 
otherwise I'll comment in this one again... 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=831811&group_id=23629


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to