The Editor Window and its Toolbar

Content:
The Editor    FAQ    Renaming atoms    Settings    Symmetry related things   

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

The Editor Toolbar


  Undo   Redo   Cut   Copy   Paste   Search
iconshort-cut (MacOs) description
Ctrl+Z (Cmd+Z) Undo the last edit step.
Ctrl+Y (Shift+Cmd+Z) Redo the last edit step.
Ctrl+X (Cmd+X) Cut out the selected text to Clipboard.
Ctrl+C (Cmd+C) Copy the selected text to Clipboard.
Ctrl+V (Cmd+V) Paste the text in clipboard after the cursor.
Ctrl+F (Cmd+F) Invoke the Search and Replace Tool

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Other Related Toolbar Icons

iconshort-cut (MacOs) description
Ctrl+S (Cmd+S) Saves current changes in editor to file and synchronizes the visualization with editor content.
Ctrl+ + (Cmd+ +) Increases fontsize of editor and list file viewer.
Ctrl+ - (Cmd+ -) Decreases fontsize of editor and list file viewer.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Syntax Highlighting

exampledescription
SHELXL instruction card
This is a comment for a whole line
This is a comment for the rest of line
This is a temporary comment. If a line starts with at least one space character it will be ignored by SHELXL and its content deleted after a SHELXL run. Useful as an easy way of deleting atoms.
These are numbers |n| < 10 and |n| > 10
A contiuation line. Lines can be continuated by adding '=' to the end of one line and begining the next line with at least one space.
This line is too long! Lines in shelx.ins or shelx.res files are not allowed to exceed more than 80 characters.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Mouse Over Tool Tips

exampledescription
If the mouse stays for a while on a line with an instruction then a short description of the insruction and its possible arguments is diplayed as a Tool-Tip.
Here an example of an instruction with more than one version.
Free variables used are interpreted and the result is shown as a Tool-Tip.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Locating Atoms Found in Editor in the Three Dimensional Structure Visualization

If you wish to locate an atom of your editor file in the structure visualization window then right click on the line that contains the atoms name and chose in the pop-up menu 'locate ... in structure'.

The atom will get selected and centred in the visualization window.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Search and Replace

The search and replace sub window is shown when either 'Ctrl+F' (Cmd+F) or 'F3' is pressed on the keyboard or the icon is clicked. The text in the search-text input is interpreted as a regular expression. If the search text does not match anything in the editor the search-text input window gets colored dark red.

The search text in the example above would match all hydrogen atoms in the structure.

'^'
means that the characters following must be at the beginning of the line.
'\d+'
means that characters 0-9 will match if they apear one or more times.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Regular Expressions

A good text on regexps is Mastering Regular Expressions (Third Edition) by Jeffrey E. F. Friedl, ISBN 0-596-52812-4. The following text is taken from the Qt-developers help:

Characters and Abbreviations for Sets of Characters

Element Meaning
c A character represents itself unless it has a special regexp meaning. e.g. c matches the character c.
\c A character that follows a backslash matches the character itself, except as specified below. e.g., To match a literal caret at the beginning of a string, write \^.
\n Matches the ASCII line feed (LF, 0x0A, Unix newline).
\r Matches the ASCII carriage return (CR, 0x0D).
\t Matches the ASCII horizontal tab (HT, 0x09).
. (dot) Matches any character (including newline).
\d Matches a digit.
\D Matches a non-digit.
\s Matches a whitespace character.
\S Matches a non-whitespace character.
\w Matches a word character or '_').
\W Matches a non-word character.

Quantifiers

By default, an expression is automatically quantified by {1,1}, i.e. it should occur exactly once. In the following list, E stands for expression. An expression is a character, or an abbreviation for a set of characters, or a set of characters in square brackets, or an expression in parentheses.
Expression QuantifierDescription
E? Matches zero or one occurrences of E. This quantifier means The previous expression is optional, because it will match whether or not the expression is found. E? is the same as E{0,1}. e.g., dents? matches 'dent' or 'dents'.
E+ Matches one or more occurrences of E. E+ is the same as E{1,}. e.g., 0+ matches '0', '00', '000', etc.
E* Matches zero or more occurrences of E. It is the same as E{0,}. The * quantifier is often used in error where + should be used. For example, if \s*$ is used in an expression to match strings that end in whitespace, it will match every string because \s*$ means Match zero or more whitespaces followed by end of string. The correct regexp to match strings that have at least one trailing whitespace character is \s+$.
E{n} Matches exactly n occurrences of E. E{n} is the same as repeating E n times. For example, x{5} is the same as xxxxx. It is also the same as E{n,n}, e.g. x{5,5}.
E{n,} Matches at least n occurrences of E.
E{,m} Matches at most m occurrences of E. E{,m} is the same as E{0,m}.
E{n,m} Matches at least n and at most m occurrences of E.

Assertions

Assertions make some statement about the text at the point where they occur in the regexp but they do not match any characters. In the following list E stands for any expression.
AssertionDescription
^ The caret signifies the beginning of the string. If you wish to match a literal ^ you must escape it by writing \\^. For example, ^#include will only match strings which begin with the characters '#include'. (When the caret is the first character of a character set it has a special meaning.
$ The dollar signifies the end of the string. For example \d\s*$ will match strings which end with a digit optionally followed by whitespace. If you wish to match a literal $ you must escape it by writing \\$.
\b A word boundary. For example the regexp \bOK\b means match immediately after a word boundary (e.g. start of string or whitespace) the letter 'O' then the letter 'K' immediately before another word boundary (e.g. end of string or whitespace). But note that the assertion does not actually match any whitespace so if we write (\bOK\b) and we have a match it will only contain 'OK' even if the string is "It's OK now".
\B A non-word boundary. This assertion is true wherever \b is false. For example if we searched for \Bon\B in "Left on" the match would fail (space and end of string aren't non-word boundaries), but it would match in "tonne".
(?=E) Positive lookahead. This assertion is true if the expression matches at this point in the regexp. For example, const(?=\s+char) matches 'const' whenever it is followed by 'char', as in 'static const char *'. (Compare with const\s+char, which matches 'static const char *'.)
(?!E) Negative lookahead. This assertion is true if the expression does not match at this point in the regexp. For example, const(?!\s+char) matches 'const' except when it is followed by 'char'.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

Code Completor

If you hit a lower case character while the cursor is in column 1 the Code Completor is invoked. The Code Completor is a popup window presenting all SHELXL instruction beginning with the same characters you typed. You can use the arrow keys and 'Enter' or the mouse to select one of the proposed instructions. If you continue typing you can either reduce the matching instruction or ignore the Completor. If you use upper case characters or your typed-in word does not match any SHELXL instruction then the Code Completor does not show up.

In order to comment out instructions place the cursor on the column 1 preceding your atom or instruction and type 'r Enter'. This does only work correctly if your atom or instruction starts with an uppercase character.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

AFIX Block Highlighter

The AFIX-Block Highlighter highlights AFIX blocks beginning with 'AFIX n'. Where n is > 0. AFIX block ends with 'AFIX 0' or HKLF. If a new AFIX n block is opened before an already opened block is closed the color of the AFIX-Block Highlighter changes into red. The normal color of AFIX-Block Highlighter inside of an AFIX-Block is darkgreen. Inside of an AFIX 5m, 6m, 7m, 10m, 11m or 17+m Block the color can change into purple if it is interupted by a hydrogen atom AFIX Block.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top   

PART Block Highlighter

The PART-Block Highlighter highlights regions in the editor file where atoms belong to PART n and n ≠ 0.

Content:
The Editor Toolbar    Other Related Toolbar Icons    Syntax Highlighting    Mouse Over Tool Tips    Locating Atoms Found in Editor in the Three Dimensional Structure Visualization    Search and Replace    Regular Expressions    Code Completor    AFIX Block Highlighter    PART Block Highlighter    Top