欢迎光临散文网 会员登陆 & 注册

3.8. 将命名方案从一个片段复制到另一个片段(OLEX2使用手册)

2021-02-25 13:22 作者:DJ_Tokyo  | 我要投稿

原文如下:


Copy naming scheme from one fragment to another


This section describes how to transfer labelling scheme from one fragment to another for consistent labelling. Note that if the '-i' option was used for the matching; it also should be used for the naming.


An atom of the fragment with the original naming scheme and an atom of the fragment to which the naming scheme to be transferred should be selected, then the following command have to be typed:


>>match -n=mask


If the mask starts from '$' or '-' a special action is taken. The '$' character instructs the procedure to replace the give number of characters after the '$' in atom labels with the characters, for example:


>>match -n=$2


will replace labels like C101, Cu10, C10a to C201, C20a and Cu20.


The '-' instructs the procedure to replace the ending chars of the labels with the give characters, for example:


>>match -n=-b


will replace labels like C101, Cu10, C10a to C10b, C10b and Cu1b.


Any other values of 'mask' are simply added to the labels, like


>>match -n=a


will replace labels like C101, Cu10, C10a to C201a, C10a and Cu10a.


Note that the labels may become invalid for the use with some programs and will be trimmed/changed on the next file input/output operation.


Atom name suffix can be changed by the following command:


>>name [atoms] -s=[suffix]


if no atom names provided, suffix of all atoms will be changed to the provided one or removed (if no value is provide for the '-s' option). The suffix here is assumed the ending of the atom name following the atom symbol or any number, e.g. for C12a, suffix is 'a', for C12 the suffix is empty and for Cz the suffix is 'z'


译文如下:


3.8. 将命名方案从一个片段复制到另一个片段



本节介绍如何将命名方案从一个片段转移到另一个片段以实现一致的编号标签。请注意,若“-i”选项用于进行匹配,则还应将其用于命名。


应当选择具有原始命名方案的片段的一个原子以及将被转移命名方案的片段的一个原子,然后需要键入以下命令:


>>match -n=mask


若mask从'$'或'-'开始,则执行特殊操作。'$'字符指示程序用字符替换原子标签中'$'后面的给定数值,例如:


>>match -n=$2


将使得诸如C101、Cu10、C10a的标签替换为C201、Cu20、C20a。


'-'指示程序用给定字符替换标签的结束字符,例如:


>>match -n=-b


将使得诸如C101、Cu10、C10a的标签替换为C10b、Cu1b、C10b。


'mask'的任意其余值仅将其简单添加至标签中,例如:


>>match -n=a


将使得诸如C101、Cu10、C10a的标签替换为C101a、Cu10a、C10aa。


请注意,对于某些程序,标签可能会变得无效(例如原子名称超过四个字符),并将在下一次文件输入/输出操作时进行修剪/更改。


原子标签后缀可通过以下指令更改:


>>name [atoms] -s=[suffix]


若未提供原子名称,则所有原子的后缀都将被更改或移除(若'-s'选项未提供参数)。此处后缀假定为原子符号或任何数字后面的原子名称的结尾,即,对于C12a,后缀为'a',对于C12,无后缀,对于Cz,后缀为'z'。


本文辅助视频如下:

3.8-将命名方案从一个片段复制到另一个片段

https://www.bilibili.com/video/BV19f4y1z7hL


公众号文章链接:

https://mp.weixin.qq.com/s?__biz=MzU0NjkzMTM1MQ==&mid=2247485350&idx=3&sn=1af006d4727eb50a081c9c8a85c5a867&chksm=fb57505ecc20d9481417cb237960b86edb403baf650124d2263ed04a628b01994572f650e871&token=1126004319&lang=zh_CN#rd



3.8. 将命名方案从一个片段复制到另一个片段(OLEX2使用手册)的评论 (共 条)

分享到微博请遵守国家法律