6. 扩展模块(OLEX2使用手册)
原文如下:
Extension Modules
Extension modules provide extra functionality for Olex2. There are various reasons as to why we don't provide that functionality with the standard version of Olex2:
Some productivity tools are not free
Licence issues may prevent us from distributing some modules with Olex2
Modules can be developed independently from the normal Olex2 development cycles
At the moment, we are working mainly on two productivity modules: ReportPlus and DrawPlus. Both take the existing functionality of Olex2 and make it much easier for our users to access some of the more difficult commands and concepts in Olex2. You may think of these modules as a collection of complicated macros that make your life much easier when it comes to creating reports and preparing images.
These extensions are not free, but during the development phase, we will make them available for free and without any obligations (on either part!) to anyone who wants to use them. You can register for this in Olex2 (Home > Extension Modules) and the licence you obtain will expire after 30 days. When that happens, just drop us an e-mail and most likely we will extend your licence -- especially if you keep in regular touch with us regarding bug reports, ideas, use-case scenarios etc.
If you are interested in using these extension on a permanent basis, please contact us and we will talk things through and we will then try and reach an agreement between OlexSys Ltd and your facility, university or organisation.
Installing Extension Modules
The Extension Modules tool is in the Home tab of Olex2:
Installation from Olex2 (Online)

You must provide your e-mail address, and may provide a Reference item. The selection of available modules depends on the version of Olex2.
Installing the modules this way assumes that you have an internet connection, your proxy settings are correct and Olex2 can access internet without any complications.
After you request a module this way, please check your e-mail and press the 'Activate' link contained in the e-mail we will send to you. After you have done this, you will be able to install the module in Olex2 (go back to the 'Extension Modules' tool and check for messages. After restart of Olex2 the module should be installed (and will usually be available from the Tool menu, except for the 3D Plus module, which currently doesn't have a GUI!
A standard activation is valid for up to 3 installations and for 30 days. After this period, please contact us and we will be happy to extend your testing period until the testing phase is completed.
Offline Installation
If you are not online, or the online installation fails for some reason, you can also install the extension modules offline. Please contact us with your PC authentication token which you can get from Olex2 using ‘GetId’ command that will print the token and also copy it to clipboard.
Available Modules
ReportPlus, is an extension module for Olex2, adding tools for the preparation of professional structure reports to the standard version of Olex2. The ability to create quality reports quickly and reliably is probably the single most important improvement in the small-molecule structure determination workflow.
DrawPlus, this extension module exports your current structure into a file format that can be understood by 3D printers. There is no GUI for this module!
With this extension module enabled, you can export your structure in the following 3D output formats: PLY, STL and VRML. These files can be used for 3D printing. STL files are most primitive and provide monochrome set of polygons, PLY, in addition to STL format also provides the color output. VRML file output provides model almost identical to the one visible in Olex2. Once the module is installed the users gets these three commands:
PictSTL
PictPLY
PictWRL
These commands take a single argument - the file name, the extension is not required.
External Programs
SHELX
All programs of the SHELX family can interact seamlessly with Olex2. There is no need for registering any of these programs with Olex2, it is enough if the folder containing the ShelX programs are on the system PATH. This is normally the case if ShelXTL has been installed on a system. Otherwise, you will need to set you system PATH variable to include the folder where you keep your SHELX executables.
Please note that the SHELX executables that are shipped with WinGX do not work with Olex2. These executables have been modified in such a way that they will only work properly with WinGX. Since WinGX puts the folder that contains these executables on the system PATH, you might find that SHELX appears in Olex2 - and then doesn't work. In this case, you will need to get new SHELX executables and put them in the same folder where Olex2 is installed - executables found there will be used by Olex2 preferentially.
Olex2 uses shelxl.exe name as the default ShelXL. If you have new version of ShelXL and still want to use 1997 version occasionally, you may want to rename the latter to shelxl-97.exe – it then will appear as a separate item in the list of the available refinement programs.
Platon
John Warren has provided an interface to PLATON. If Platon is on the system PATH, you will see ‘P’ icon at the top of the GUI. Note that some manufacturers distribute Platon which cannot be used with Olex2. In this case you need to install the original Platon and make sure that it comes first on the system PATH (paths are traversed in order of appearance).
SuperFlip
Originally Arie van der Lee has provided an interface to SuperFlip; this had been superseded by tighter integration of Superflip into Olex2.
About Macros and Scripting in Olex2
Olex2 supports two different types of external scripting: Macros and Python scripts. An example of the internal script is shown in Change default programs. The Python scripts can be either executed externally or attached to the Olex2 console.
译文如下:
6. 扩展模块
扩展模块为Olex2提供额外的功能。关于我们为何不在标准Olex2中提供该功能,有多种原因:
有些生产力工具不是免费的
许可证问题可能会阻止我们使用Olex2发行某些模块
模块可以独立于正常的Olex2开发周期进行开发
目前,我们主要致力于两个生产力模块:ReportPlus和DrawPlus。两者都利用了Olex2的现有功能,并使我们的用户更容易获取Olex2中一些更费解的指令和概念。您可以将这些模块认为是复杂宏的集合,在创建报表和准备图像时,这些宏会使您的工作更加轻松。
这些扩展不是免费的,但在开发阶段,我们将免费提供它们,并且不承担任何义务(任何一方!)给任何想要使用的人。您可以在Olex2(Home > Extension Modules)中注册,您获得的许可证将在30天后过期。当这种情况发生时,只要给我们发一封电子邮件,我们很可能会延长您的许可证期限——特别是如果您就bug报告、想法、用例场景等与我们保持定期联系的话。
如果您有兴趣永久使用这些扩展,请与我们联系,我们将进行讨论,然后我们将尝试在OlexSys Ltd和您的设施、大学或组织之间达成协议。
6.1. 安装扩展模块
扩展模块工具在Olex2的Home栏:
6.1.1. 从Olex2中安装(在线)

您必须提供您的电子邮件地址,并可以提供一个Reference项目。可用模块的选择取决于Olex2的版本。
以这种方式安装模块的前提是您已经联网,代理设置正确,并且Olex2可以联网而不会出现任何问题。
以这种方式发送请求模块后,请检查您的电子邮件并点击我们发送给您的电子邮件中所包含的“Activate link”。完成此操作后,您将能够在Olex2中安装模块(返回“Extension Modules”工具并检查消息)。在重启Olex2后,模块应该已安装完成(并且通常可以从Tool菜单中使用,除了3D Plus,它目前没有GUI!)。
标准激活最多可用于3个安装(模块)和30天(许可证期限)。在此期间之后,请与我们联系,我们将很高兴延长您的测试期,直到测试阶段完成。
6.1.2. 脱机安装
若您未联网,或联网安装由于某种原因失败,也可以脱机安装扩展模块。请用您的PC身份认证令牌联系我们,你可以使用'GetId'指令获取该令牌,该指令将打印该令牌并将其复制到剪切板。
6.2. 可用模块
6.2.1. ReportPlus
ReportPlus是Olex2的一个扩展模块,为标准版本的Olex2添加用于准备专业的结构报告工具。快速可靠地生成高质量报告的能力可能是小分子结构确定工作流程中最重要的改进。
6.2.2. DrawPlus
DrawPlus,这个扩展模块可以将您当前的结构导出为一种可以被3D打印机理解的文件格式。此模块(3D Plus)没有GUI!
启用此扩展模块后,可以以下3D输出格式导出结构:PLY、STL和VRML。这些文件可用于3D打印。STL(https://en.wikipedia.org/wiki/STL_(file_format))文件是最原始的,提供了单色的多边形集。PLY(https://en.wikipedia.org/wiki/PLY_(file_format)),除了STL格式还提供了颜色输出。VRML(https://en.wikipedia.org/wiki/Vrml)文件输出提供的模型与Olex2屏幕中所见的模型几乎相同。安装模块后,用户将获得以下三个指令:
PictSTL
PictPLY
PictWRL
这些指令只接受一个参数:文件名,扩展名不是必需的。
6.3. 外部程序
SHELX
SHELX家族的所有程序都可以与Olex2无缝交互。不需要向Olex2注册任何这些程序,只要包含ShelX程序的文件夹位于系统路径(PATH)就足够了。若系统中安装了ShelXTL,则通常会出现这种情况。否则,需要将系统PATH变量设置为包含保存SHELX可执行文件的文件夹。
请注意,WinGX附带的SHELX可执行文件不能与Olex2一起使用。这些可执行文件做了修改,因此它们只能与WinGX一起正常工作。由于WinGX将包含这些可执行文件的文件夹放在系统路径(PATH)上,所以您可能会发现这些SHELX出现在Olex2中,然后就不起作用了。在这种情况下,你需要获取新的SHELX可执行文件,并将它们放在安装Olex2的同一文件夹中——在那里找到的可执行文件将优先由Olex2使用。
Olex2使用shelxl.exe名称的文件作为默认ShelXL。如果您有新版本的ShelXL,并且仍然希望偶尔使用1997版本,您可能需要将后者重命名为shelxl-97.exe——然后它将作为一个单独的项目出现在可用的精修程序中。
Platon
John Warren为PLATON提供了一个接口。若Platon在系统路径(PATH)上,则您可以在GUI顶部看到“P”图标。请注意,一些制造商发布的Platon不能与Olex2一起使用。在这种情况下,您需要安装原始的Platon并确保它位于系统路径(PATH)的第一位(路径按出现顺序排列)。
SuperFlip
最初,Arie van der Lee提供了一个到SuperFlip的接口;这个接口被SuperFlip在Olex2中的更紧密集成所取代。
关于Olex2中的宏和脚本
Olex2支持两种不同类型的外部脚本:宏和Python脚本。3.14. 更改默认程序中展示了内部脚本的示例。Python脚本可以在外部执行,也可以附加到Olex2控制台。
本文相关视频:
Olex2视频教程——Olex2中扩展程序ReportPlus的应用
https://www.bilibili.com/video/BV1vb411772L
Olex2视频教程——扩展模块DrawPlus的介绍
https://www.bilibili.com/video/BV1Fb41147j7
Olex2视频教程——扩展模块DrawPlus中Ctrl+J的应用
https://www.bilibili.com/video/BV1ab411K7zP
Olex2视频教程——穿过对称元素的甲苯无序处理(FragmentDB工具的应用)
https://www.bilibili.com/video/BV1Yb411E7n2
公众号文章链接:
https://mp.weixin.qq.com/s?__biz=MzU0NjkzMTM1MQ==&mid=2247485391&idx=1&sn=226ac742ae70b8a60df9db86e5b1478d&chksm=fb575037cc20d9214be248cf9e10073c35efd4acf5c0037d30cc15bc1243bda63d4db68b81e8&token=258865377&lang=zh_CN#rd
