6. 擴(kuò)展模塊(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.?擴(kuò)展模塊
擴(kuò)展模塊為Olex2提供額外的功能。關(guān)于我們?yōu)楹尾辉跇?biāo)準(zhǔn)Olex2中提供該功能,有多種原因:
有些生產(chǎn)力工具不是免費(fèi)的
許可證問題可能會阻止我們使用Olex2發(fā)行某些模塊
模塊可以獨立于正常的Olex2開發(fā)周期進(jìn)行開發(fā)
目前,我們主要致力于兩個生產(chǎn)力模塊:ReportPlus和DrawPlus。兩者都利用了Olex2的現(xiàn)有功能,并使我們的用戶更容易獲取Olex2中一些更費(fèi)解的指令和概念。您可以將這些模塊認(rèn)為是復(fù)雜宏的集合,在創(chuàng)建報表和準(zhǔn)備圖像時,這些宏會使您的工作更加輕松。
這些擴(kuò)展不是免費(fèi)的,但在開發(fā)階段,我們將免費(fèi)提供它們,并且不承擔(dān)任何義務(wù)(任何一方!)給任何想要使用的人。您可以在Olex2(Home > Extension Modules)中注冊,您獲得的許可證將在30天后過期。當(dāng)這種情況發(fā)生時,只要給我們發(fā)一封電子郵件,我們很可能會延長您的許可證期限——特別是如果您就bug報告、想法、用例場景等與我們保持定期聯(lián)系的話。
如果您有興趣永久使用這些擴(kuò)展,請與我們聯(lián)系,我們將進(jìn)行討論,然后我們將嘗試在OlexSys Ltd和您的設(shè)施、大學(xué)或組織之間達(dá)成協(xié)議。
6.1.?安裝擴(kuò)展模塊
擴(kuò)展模塊工具在Olex2的Home欄:
6.1.1.?從Olex2中安裝(在線)

? ? ? ? ? ? ? ? ? ? ? ? ? ?
您必須提供您的電子郵件地址,并可以提供一個Reference項目??捎媚K的選擇取決于Olex2的版本。
以這種方式安裝模塊的前提是您已經(jīng)聯(lián)網(wǎng),代理設(shè)置正確,并且Olex2可以聯(lián)網(wǎng)而不會出現(xiàn)任何問題。
以這種方式發(fā)送請求模塊后,請檢查您的電子郵件并點擊我們發(fā)送給您的電子郵件中所包含的“Activate link”。完成此操作后,您將能夠在Olex2中安裝模塊(返回“Extension Modules”工具并檢查消息)。在重啟Olex2后,模塊應(yīng)該已安裝完成(并且通??梢詮腡ool菜單中使用,除了3D Plus,它目前沒有GUI!)。
標(biāo)準(zhǔn)激活最多可用于3個安裝(模塊)和30天(許可證期限)。在此期間之后,請與我們聯(lián)系,我們將很高興延長您的測試期,直到測試階段完成。
6.1.2.?脫機(jī)安裝
若您未聯(lián)網(wǎng),或聯(lián)網(wǎng)安裝由于某種原因失敗,也可以脫機(jī)安裝擴(kuò)展模塊。請用您的PC身份認(rèn)證令牌聯(lián)系我們,你可以使用'GetId'指令獲取該令牌,該指令將打印該令牌并將其復(fù)制到剪切板。
6.2.?可用模塊
6.2.1. ReportPlus
ReportPlus是Olex2的一個擴(kuò)展模塊,為標(biāo)準(zhǔn)版本的Olex2添加用于準(zhǔn)備專業(yè)的結(jié)構(gòu)報告工具??焖倏煽康厣筛哔|(zhì)量報告的能力可能是小分子結(jié)構(gòu)確定工作流程中最重要的改進(jìn)。
6.2.2. DrawPlus
DrawPlus,這個擴(kuò)展模塊可以將您當(dāng)前的結(jié)構(gòu)導(dǎo)出為一種可以被3D打印機(jī)理解的文件格式。此模塊(3D Plus)沒有GUI!
啟用此擴(kuò)展模塊后,可以以下3D輸出格式導(dǎo)出結(jié)構(gòu):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
這些指令只接受一個參數(shù):文件名,擴(kuò)展名不是必需的。
6.3.?外部程序
SHELX
SHELX家族的所有程序都可以與Olex2無縫交互。不需要向Olex2注冊任何這些程序,只要包含ShelX程序的文件夾位于系統(tǒng)路徑(PATH)就足夠了。若系統(tǒng)中安裝了ShelXTL,則通常會出現(xiàn)這種情況。否則,需要將系統(tǒng)PATH變量設(shè)置為包含保存SHELX可執(zhí)行文件的文件夾。
請注意,WinGX附帶的SHELX可執(zhí)行文件不能與Olex2一起使用。這些可執(zhí)行文件做了修改,因此它們只能與WinGX一起正常工作。由于WinGX將包含這些可執(zhí)行文件的文件夾放在系統(tǒng)路徑(PATH)上,所以您可能會發(fā)現(xiàn)這些SHELX出現(xiàn)在Olex2中,然后就不起作用了。在這種情況下,你需要獲取新的SHELX可執(zhí)行文件,并將它們放在安裝Olex2的同一文件夾中——在那里找到的可執(zhí)行文件將優(yōu)先由Olex2使用。
Olex2使用shelxl.exe名稱的文件作為默認(rèn)ShelXL。如果您有新版本的ShelXL,并且仍然希望偶爾使用1997版本,您可能需要將后者重命名為shelxl-97.exe——然后它將作為一個單獨的項目出現(xiàn)在可用的精修程序中。
?
Platon
John Warren為PLATON提供了一個接口。若Platon在系統(tǒng)路徑(PATH)上,則您可以在GUI頂部看到“P”圖標(biāo)。請注意,一些制造商發(fā)布的Platon不能與Olex2一起使用。在這種情況下,您需要安裝原始的Platon并確保它位于系統(tǒng)路徑(PATH)的第一位(路徑按出現(xiàn)順序排列)。
?
SuperFlip
最初,Arie van der Lee提供了一個到SuperFlip的接口;這個接口被SuperFlip在Olex2中的更緊密集成所取代。
?
關(guān)于Olex2中的宏和腳本
Olex2支持兩種不同類型的外部腳本:宏和Python腳本。3.14.?更改默認(rèn)程序中展示了內(nèi)部腳本的示例。Python腳本可以在外部執(zhí)行,也可以附加到Olex2控制臺。
本文相關(guān)視頻:
Olex2視頻教程——Olex2中擴(kuò)展程序ReportPlus的應(yīng)用
https://www.bilibili.com/video/BV1vb411772L
Olex2視頻教程——擴(kuò)展模塊DrawPlus的介紹
https://www.bilibili.com/video/BV1Fb41147j7
Olex2視頻教程——擴(kuò)展模塊DrawPlus中Ctrl+J的應(yīng)用
https://www.bilibili.com/video/BV1ab411K7zP
Olex2視頻教程——穿過對稱元素的甲苯無序處理(FragmentDB工具的應(yīng)用)
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
