|
★声明:本文仅代表个人观点,笔者学识有限,资料整理过程中难免存在疏漏谬误,请不吝指正。 如需在论文中致谢笔者,请添加以下内容: We appreciate the help of freelancer DJ_Tokyo in the crystal dataprocess and structure solution and refinement. ZSGH简介 | The Zürich Space Group Helper: | Zürich空间群助手: | | A free, didactic tool for space group determination using systematic absences. | 一个利用系统消光进行空间群确定的免费教学工具。 |
| © 2017-2026 M. Solar, N. Trapp, M. Wörle. Small Molecule Crystallography Center @ ETH Zürich | 版权所有2017-2026 M. Solar, N. Trapp, M. Wörle. 苏黎世联邦理工学院小分子晶体学中心 |
| Repository: | 网址: | | https://gitlab.ethz.ch/trappn/zsgh | https://gitlab.ethz.ch/trappn/zsgh | | References: | 参考文献: | | R. W. Grosse-Kunstleve, N.K. Sauter, P.D. Adams, Acta Cryst. A (2004), 60, 1-6, doi: 10.1107/S010876730302186X. P. M. de Wolff, Comput. Math. Applic. (1988), 16(5-8), 487-492. P. M. de Wolff, Acta Cryst. A (1991), 47, 29-36, doi: 10.1107/S0108767390009485. I. Krivy, B. Gruber, Acta Cryst. A (1976), 32, 297-298, doi: 10.1107/S0567739476000636. B. Gruber, Acta Cryst. A (1973), 29, 433-440, doi: 10.1107/S0567739473001063. |
| Downloads: | 下载: | | most recent version: v1.9 (30.07.2026 currently Windows only) | 最新版本:v1.9(30.07.2026当前仅限Windows) |
| Windows Installer (64bit, Windows 7 or later): | Windows安装程序(64位,Windows 7或更高版本): |
https://gitlab.ethz.ch/trappn/zsgh/-/raw/master/bin/win64/ZSGH_win_1.9_300726.exe | Linux Binaries (64bit): | Linux二进制文件(64位): |
https://gitlab.ethz.ch/trappn/zsgh/-/tree/master/bin/linux64 | MacOS Installer (Intel 64bit, 10.9 or later): | MacOS安装程序(英特尔64位,10.9或更高版本): |
https://gitlab.ethz.ch/trappn/zsgh/-/raw/master/bin/mac/zsgh_installer.pkg | MacOS Installer (Apple Silicon, 15.0 or later): | MacOS安装程序(苹果Silicon,15.0或更高版本): |
https://gitlab.ethz.ch/trappn/zsgh/-/raw/master/bin/mac/zsgh_installer-arm.pkg | Tutorial with example structure (not identical with ZSC2024 example): | 带示例结构的教程(与ZSC2024示例不同): |
https://gitlab.ethz.ch/trappn/zsgh/-/tree/master/examples/tutorial | Installation videos showing Olex2 installation & integration of ShelX programs / ZSGH: | 显示ShelX程序/ZSGH的Olex2安装和集成的安装视频: |
或查看B站视频: Windows 11: 晶体学课程安装视频(Windows 11):https://www.bilibili.com/video/BV1WSJv6sEHC MacOS Sequoia: 晶体学课程安装视频(MacOS):https://www.bilibili.com/video/BV1JTn564Euv | Here is the custom.xld file you will need for integration in Olex2 on Mac. | 这是在Mac上集成Olex2所需的custom.xld文件。 |
| usage: zsgh [-h] [-d] [STRUCTURE_ID] | 用法:zsgh [-h] [-d] [STRUCTURE_ID] |
| positional arguments: | 位置参数: | | STRUCTURE_ID | STRUCTURE_ID |
| optional arguments: | 可选参数: | | -h, --help: show this help message and exit | -h, --help:显示此帮助信息并退出 | | -d: use darker terminal colors (for white background) | -d:使用较深的终端背景(用于白色背景) |
| The program will look for a STRUCTURE_ID.hkl file in the directory it is invoked in and present a matching list of files containing unit cell constants in a selection menu. If it cannot find any, the user will be prompted. From there on the process is guided by on-screen dialogue. | 程序将在调用它的目录中查找STRUCTURE_ID.hkl文件,并在选择菜单中显示包含晶胞常数的匹配文件列表。如果找不到,系统将提示用户。从那时起,这个过程就由屏幕上的对话来指导。 |
| Purpose: | 目的: | | ZSGH was written with the intention of providing a free, simple and universal space group determination tool to the general public. The commonly used commercial tools such as XPREP (Bruker), XPLAIN (Rigaku) and GRAL (Rigaku Oxford Diffraction) require a license or run only under Windows, thereby preventing use and distribution in lectures, workshops and schools. Free tools are often part of clunky program suites, do not run on multiple platforms and/or lack documentation. Additionally, there was a demand for a more transparent and didactic process with uncondensed output for better diagnostics. ZSGH very closely follows what a person using the International Tables of Crystallography (ITC) would do, but with some extra guidance. Although it is not strictly needed, we recommend having the ITC around. | 编写ZSGH的目的是为公众提供一种免费、简单和通用的空间群确定工具。常用的商业工具,如XPREP(布鲁克)、XPLAIN(理学)和GRAL(理学牛津衍射),需要许可证或仅在Windows下运行,从而防止在讲座、研讨会和学校中使用和分发。免费工具通常是笨重的程序套件的一部分,不能在多个平台上运行和/或缺乏文档。此外,还需要一个更透明、更具教育性的过程,输出不密集,以实现更好的诊断。ZSGH非常密切地关注使用国际晶体学表(ITC)的人会做什么,但有一些额外的指导。虽然这不是严格需要的,但我们建议有国际晶体学表在手。 |
| Feel free to take any part of the code and implement it into your own software. The implementation is minimum-dependency, (almost) pure Python3. Single file commandline executables are provided. | 您可以自由地使用代码的任何部分并将其实现到您自己的软件中。该工具具有最小依赖性,(几乎)纯Python3。提供了单文件命令行可执行文件。 |
Olex2 (http://www.olexsys.org/) version 1.3 and later recognizes the executable when found somewhere in the system path or the Olex2 installation directory. This is automatically the case when you use the Windows or MacOS installer. The program can then be invoked from the Olex2 commandline by typing "zsgh", or via a hyperlink under the "Solve" tab. See file Olex2_integration.txt for instructions using current Olex2 versions (for MacOS and Linux additionally a macro must be changed). | Olex2(http://www.olexsys.org/)1.3及更高版本在系统路径或Olex2安装目录中找到可执行文件时会识别该可执行文件。当您使用Windows或MacOS安装程序时,该情况会自动出现。然后,可以通过键入“zsgh”或通过“Solve”选项卡下的超链接从Olex2命令行调用该程序。有关使用当前Olex2版本的说明,请参阅文件Olex2_integration.txt(对于MacOS和Linux,还必须更改宏)。 |
| Note that without access to the covariance matrix, we can only roughly estimate transformed unit cell esds. If angles change significantly during transformation, it is highly advisable to refinalize the data in the diffractometer software using the correct cell setting to recalculate standard errors. | 请注意,如果不访问协方差矩阵,我们只能粗略估计变换后的晶胞估计标准偏差。如果在转换过程中角度发生显著变化,强烈建议使用正确的晶胞设置在衍射仪软件中重新完成数据,以重新计算标准误差。 |
| Program features: | 程序特点: | | unit cell determination using systematic absence violations procedure very close to using ITC didactic / verbose procedures reads standard .hkl files and spots the most common formatting problems reads UC/formula/wavelength from .cif_od/.cif/.p4p/.res/.ins/.hkl files or user input Niggli reduction systematic absence counter reciprocal plane display semi-automatic space group determination (just press return a lot and ultimately you will end up with a space group) can transform into arbitrary alternate cell settings transforms HKL indices using final matrix Intensity statistics (including Rint & Rsym) automatic crystal system suggestion based on G6 vector & Rsym (in manual mode) E-value statistics & N(z) plots unfiltered listing of all absences in all directions (like Platon) Condensed intensity statistics for final Laue class writes SHELX compatible .ins and transformed .hkl file or .ins with HKLF4 matrix (leaving .hkl untouched) tight Olex2 integration complete log file | 利用系统消光的衍射强度确定晶胞 程序非常接近使用国际晶体学表 说教式/冗长程序 读取标准衍射文件并发现最常见的格式问题 从.cif_od/.cif/.p4p/.res/.ins/.hkl文件或用户输入读取晶胞参数/分子式/波长 Niggli约化 系统消光计数器 倒易平面显示 半自动空间群确定(只需不停按回车,最终您将得到一个空间群) 可转换为任意替代晶胞设置 使用最终矩阵转换HKL指数 强度统计(包括Rint和Rsym) 基于G6矢量和Rsym的自动晶系建议(手动模式) E值统计和N(z)图 未经过滤的所有方向的所有消光衍射强度(类似于PLATON) 最终Laue群简明强度统计 编写SHELX兼容的.ins文件和转换后的.hkl文件或带有HKLF4矩阵的.ins文件(保持.hkl不变) 紧密的Olex2集成 完整日志文件 |
Olex2_integration.txt内容如下: ---WINDOWS--- | Nothing to do. Just use the installer and Olex2 will pick up the zsgh location and automatically enable buttons & scripts. You can call zsgh from the Olex2 command line, or use the button labelled "Space Group determination using ZSGH" under the "Solve" tab. | 无需做任何事情。只需使用安装程序,Olex2就会获取zsgh位置并自动启用按钮和脚本。您可以从Olex2命令行调用zsgh,或使用“Solve”选项卡下标记为“Space Group determination using ZSGH”的按钮。 |
---MACOSX--- | NOTE: | 注意: | | Under MacOS, you need to add a macro to run ZSGH to circumvent some really pesky limitations enforced by Apple (i.e. programs are normally not allowed to start terminals). The following procedure was tested and found working with Olex2 1.5 (2024.02.16) under MacOS 10.15.7, 13.6.6, and 14.4.1: | 在MacOS下,你需要添加一个宏来运行ZSGH,以规避苹果公司实施的一些非常讨厌的限制(即程序通常不允许启动终端)。以下程序经过测试,发现在MacOS 10.15.7、13.6.6和14.4.1下适用于Olex2 1.5(2024.02.16): |
| 1. Install Olex2 from olex2-1.5.app.dmg to "Applications" folder (hold down ctrl while dragging to make sure a local copy is created instead of a link). Eject olex2-1 drive. Start Olex2, let it compile and update, then close the program. 2. Install ZSGH using zsgh_installer.pkg. If MacOS complains about security, hold down ctrl while clicking on the icon, then select "open" and confirm. Without further changes, you can now run zsgh from anywhere using a terminal. However, the following steps allow tighter integration into Olex2: 3. in Olex2's "Home" tab, open "Settings" and go to PATH, enter the directory containing the zsgh files (/usr/local/bin). If there is already an entry, separate the entries with ":". Click once outside the text box and close Olex2. 4. right-click the olex2.app in the "Applications" tab of MacOS, and select "show package contents" and go to the subfolder "Contents/MacOS". If this is a new Olex2 installation, and you have no custom macros, simply copy the provided "custom.xld" into the folder, overwriting the original one. If you already have custom macros and want to preserve them, add the macro below to the file "custom.xld" using a text editor. Then restart Olex2. | 1. 将Olex2从Olex2-1.5.app.dmg安装到“Applications”文件夹中(拖动时按住ctrl以确保创建本地副本而不是链接)。弹出olex2-1驱动器。启动Olex2,让它编译和更新,然后关闭程序。 2. 使用zsgh_installer.pkg安装ZSGH。如果MacOS抱怨安全问题,请在按住ctrl的同时单击图标,然后选择“open”并确认。无需进一步更改,您现在可以使用终端从任何地方运行zsgh。但是,以下步骤允许更紧密地集成到Olex2中: 3. 在Olex2的“Home”选项卡中,打开“Settings”并转到PATH,输入包含zsgh文件的目录(/usr/local/bin)。若已有条目,请用“:”分隔条目。在文本框外单击一次并关闭Olex2。 4. 在MacOS的“Applications”选项卡中右键单击olex2.app,选择“show package contents”,然后转到子文件夹“Contents/MacOS”。如果这是一个新的Olex2安装,并且您没有自定义宏,只需将提供的“custom.xld”复制到文件夹中,覆盖原始文件夹即可。如果您已经有自定义宏并希望保留它们,请使用文本编辑器将下面的宏添加到文件“custom.xld”中。然后重新启动Olex2。 |
| Now you can call zsgh from the Olex2 command line, or use the button labelled "Space Group determination using ZSGH" under the "Solve" tab. If you don't see the program, it is possibly hidden behind another window. Here's the macro: | 现在,您可以从Olex2命令行调用zsgh,或使用“Solve”选项卡下标记为“Space Group determination using ZSGH”的按钮。如果您看不到该程序,则它可能隐藏在另一个窗口后面。以下是宏: |
<zsghhelp="Starts the Zurich Space Group Helper if installed on yourmachine" <body <args <arg1 name="dir"def='filepath()'> <arg2 name="file"def='filename()'> > <cmd <cmd1 "exec bash'zsgh-wrapper.sh' %1 %2"> > > > | INSTRUCTIONS FOR ALTERNATIVE MACROS USING TCSH AS SHELL, NOTE THAT THESE WERE LAST TESTED IN 2019 on MacOS 10.9 AND WILL PROBABLY NO LONGER WORK: Tony sent me two script variations to use with tcsh instead of bash (as installed on the classroom PCs). I uploaded the variants he describes as zsgh-wrapper_TL1.sh and zsgh-wrapper_TL2.sh (don't forget to ajust above macro accordingly). Here's his description: "I was able to change the default shell on the classroom computers to tcsh. However it did not help directly, as it seems when the script is run on those computers, the Terminal window has not learnt the path to where zsgh is stored (learnt form .cshrc), so can cd OK, but does not know zsgh. I store the X-ray programs in ~/Applications/bin. I cannot access /usr/local/bin on those computers, which is on the default path, because that folder seems not to be owned by the user. Probably a legacy from the way the room was set up and I don't want to have to sort that out. I found two ways to overcome this. One is to put an extra line in your script to start a new tcsh shell (I worked out how to avoid a second window opening) and by doing this my path definitions now get read from .cshrc. The other way is to explicitly define the path on a line in your script. The attached <scripts> show both possibilities. Probably the first is simpler as a generic solution, even if the opening of a new shell is not needed for most people." | 使用TCSH作为外壳的替代MacOS的说明,请注意,这些是在2019年在MacOS 10.9上最后一次测试的,可能不再有效:Tony给我发了两个脚本变体,用于tcsh而不是bash(安装在教室PC上)。我上传了他描述的变体zsgh-wrapper_TL1.sh和zsgh-wrapper_TL2.sh(别忘了相应地调整上面的宏)。以下是他的描述:“我能够将教室计算机上的默认shell更改为tcsh。然而,这并没有直接帮助,因为当脚本在这些计算机上运行时,终端窗口似乎没有记住存储zsgh的路径(记住形式.cshrc),所以可以cd OK,但不知道zsgh。我将X射线程序存储在“~/Applications/bin”中。我无法访问这些计算机上的“/usr/local/bin”,因为该文件夹似乎不属于用户。这可能是房间布置方式的遗留问题,我不想解决这个问题。我找到了两种方法来克服这一点。一种方法是在脚本中添加一行来启动一个新的tcsh shell(我研究了如何避免第二个窗口打开),通过这样做,我的路径定义现在可以从.cshrc中读取。另一种方法是在脚本中的一行上明确定义路径。所附的<scripts>显示了这两种可能性。第一种方法作为通用解决方案可能更简单,即使大多数人不需要打开新的shell。” |
---LINUX--- | NOTE: I found Olex2 1.5 difficult to get to run on Fedora (it is compiled under Centos afaik, but that is deprecating). Some pointers in case somebody runs into problems (tested on freshly installed Fedora 35 with Olex2 1.5-beta 2022.04.07): Vanilla Fedora 35 needs additional packages: mesa-libGLU, gtk3-devel, gtk2-devel, libpng15, python3.8, wxGTK. Do not use "olex2" to start the program, this will not work. Rather run it with "start". THE FIRST TIME YOU HAVE TO DO THIS AS ROOT OR WITH SUDO AND IT WILL IDLE A WHILE, COMPILING THINGS IN THE BACKGROUND. However after this I have to run it as a regular user because under root privileges it produces many graphics glitches. If you get random graphics glitches, see no menus or if it crashes with a wxGLContext error, open the "start" script in main Olex2 folder and uncomment the line "export OLEX2_GL_DEFAULT=TRUE". I still had to disable the gradient background to be able to read terminal output text. Once it works, you need to do a few things with zsgh: | 注意:我发现Olex2 1.5很难在Fedora上运行(它是在Centos afaik下编译的,但这是不推荐的)。一些提示,以防有人遇到问题(在新安装的Fedora 35上使用Olex2 1.5 beta 2022.04.07进行测试):Vanilla Fedora 35需要额外的软件包:mesa-libGLU、gtk3-devel、gtk2-devel、libpng15, python3.8、wxGTK。不要使用“olex2”启动程序,这将不起作用。而是用“start”运行它。第一次你必须以ROOT身份或使用SUDO执行此操作,它将闲置一段时间,在后台编译东西。然而,在此之后,我必须以普通用户的身份运行它,因为在root权限下,它会产生许多图形故障。如果您遇到随机图形故障,看不到菜单,或者如果它因wxGLContext错误而崩溃,请打开Olex2主文件夹中的“start”脚本,并取消注释“export OLEX2_GL_DEFAULT=TRUE”行。我仍然必须禁用渐变背景才能读取终端输出文本。一旦它工作正常,你需要用zsgh做一些事情: | | 1. Download zsgh, zsgh_gui and zsgh-wrapper.sh and copy them to your Olex2 installation folder (in the following I assume /opt/olex2). NOTE: zsgh-wrapper.sh works with gnome-terminal and bash, because that is what comes with Fedora. It should also be compatible with xterm (just replace gnome-terminal in the script with xterm), but in other cases it might be necessary to adjust this script. 2. Make sure your Olex2 installation folder is included in your $PATH variable (can you run Olex2 from any directory?) 3. Make sure zsgh files are all user-executable and belong to root: sudo chown root.root /opt/olex2/zsgh* sudo chmod ugo+x /opt/olex2/zsgh* 4. Using a text editor, add the following macro to /opt/olex2/custom.xld. Then restart Olex2. Now you can call zsgh from the Olex2 command line, or use the button labelled "Space Group determination using ZSGH" under the "Solve" tab. If you don't see the program, it is possibly hidden behind another window. Here's the macro: | 1. 下载zsgh、zsgh_gui和zsgh-wrapper.sh,并将它们复制到Olex2安装文件夹中(以下我假设为“/opt/olex2”)。注意:zsgh-wrapper.sh适用于gnome终端和bash,因为这是Fedora附带的。它还应该与xterm兼容(只需将脚本中的gnome终端替换为xterm),但在其他情况下,可能需要调整此脚本。 2. 确保您的Olex2安装文件夹包含在$PATH变量中(您可以从任何目录运行Olex2吗?) 3. 确保zsgh文件都是用户可执行的,并且属于root: sudo chown root.root /opt/olex2/zsgh* sudo chmod ugo+x /opt/olex2/zsgh* 4. 使用文本编辑器,将以下宏添加到“/opt/olex2/custom.xld”。然后重启Olex2。现在,您可以从Olex2命令行调用zsgh,或使用“Solve”选项卡下标记为“Space Group determination using ZSGH”的按钮。如果您看不到该程序,则它可能隐藏在另一个窗口后面。以下是宏: |
<zsghhelp="Starts the Zurich Space Group Helper if installed on yourmachine" <body <args <arg1 name="dir"def='filepath()'> <arg2 name="file"def='filename()'> > <cmd <cmd1 "exec bash'zsgh-wrapper.sh' %1 %2"> > > > 如需原文及本文PDF文档,请从以下链接下载: 提取码: kv3a
|