[xcrysden] Determine the angstrom to pixel ratio for printed images

?? ? wenlibin02 at hotmail.com
Thu May 11 05:12:56 CEST 2017


Dear Poberznik, 

Thank you for your reply. I am sorry that I did not state my problem clearly. 
When I said "my .xsf files are exactly of the same structure", I mean the physical structures 
are the same but the xyz coordinates are not the same. 

To make things clear, let's take the cubic diamond as an example. 
I have two structure files. The first one has cell vectors: 
     3.5667901038999998    0.0000000000000000    0.0000000000000000
     0.0000000000000000    3.5667901038999998    0.0000000000000000
     0.0000000000000000    0.0000000000000000    3.5667901038999998
while the second one has cell vectors rotated 45 degrees along z axis: 
     2.5221014695367603    2.5221014695367603    0.0000000000000000
    -2.5221014695367603    2.5221014695367603    0.0000000000000000
     0.0000000000000000    0.0000000000000000    3.5667901038999998
and the atoms are rotated correspondingly. Thus these two .xsf files are different but the physical 
structures remain exactly the same. The problem is that when I opened these two files using xcrysden, 
the atoms' sizes are different. I think it is caused by how xcrysden determines the display bounding 
box from the input structure, as you have mentioned in your reply.  If I know the way xcrysden 
determines the display bounding box from the input structure, I can determine the size ratio of atoms 
between the two displayed images. Can you give me some hints on this? Any suggestion will of great 
help. Thank you!


The .xcrysden files with cubic diamond structures are attached for reference. The file named 0.xcrysden 
is the one not tilted, while the file 45.xcrysden is 45 degrees titled. 

Libin Wen
Shanghai Jiao Tong University, Shanghai, China



From: xcrysden-bounces at democritos.it <xcrysden-bounces at democritos.it> on behalf of Matic Poberznik <matic.poberznik at gmail.com>
Sent: Wednesday, May 10, 2017 21:09
To: XCrySDen mailing list
Subject: Re: [xcrysden] Determine the angstrom to pixel ratio for printed images
    
Dear Libin,

> Can I fix the angstrom/pixel value before printing? Alternatively, can I know the angstrom/pixel value after the printing (I do not want to do the calibration myself since there are many structure files)?

> Another solution to this problem is to understand how XCrysDen determines the angstrom/pixel at the beginning of opening a structure. Unfortunately, the src code is too complex for me to find out the answer.
> 
> Actually, it is enough to determine the relative values of angstrom/pixel for different structure files.

XCrysDen doesn't determine the angstrom/pixel ration instead it
determines the display bounding box from the input structure (for
example it uses the crystal cell parameters to determine the display
size for crystals). So if you're cell remains the same the size of atoms
should as well.

A way to ensure the same orientation and zoom (for structures with the
same cell parameters) is by using "Save current state and structure"
option, i.e.

File => Save Current State and Structure

This will create a file *.xcrysden suffix. You can "load" an alternative
xsf file into this script and the zoom and orientation will remain the
same.

You do this by opening the *.xcrysden file with a text editor and
editing the "STRUCTURE-PART" of the file. (i.e. delete all structure
data and replace the line:

::scripting::open --xsf $system(SCRDIR)/xc_xsf.$system(PID)

with

::scripting::open --xsf /path/to/xsf/name.xsf

where name.xsf is your xsf file (if it's in the current working
directory the path isn't needed)
You open the script file with the command:

xcrysden -s nameofscript.xcrysden

Further information for scripting files is available here:

http://www.xcrysden.org/doc/scripting.html

Also when posting to the mailing list please state your name and
affiliation.

Best Regards,

Matic Poberznik
J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia
_______________________________________________
XCrySDen mailing list
XCrySDen at democritos.it
http://www.democritos.it/mailman/listinfo/xcrysden
    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0.xcrysden
Type: application/octet-stream
Size: 29698 bytes
Desc: 0.xcrysden
Url : http://www.democritos.it/pipermail/xcrysden/attachments/20170511/4ceafa3b/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 45.xcrysden
Type: application/octet-stream
Size: 29698 bytes
Desc: 45.xcrysden
Url : http://www.democritos.it/pipermail/xcrysden/attachments/20170511/4ceafa3b/attachment-0003.obj 


More information about the XCrySDen mailing list