Editing

flat.editing

Module for editing molecular objects.

flat.editing.align2eigen(selection='all', state=0, *, _self=cmd)
DESCRIPTION

Align selection with it’s eigen vector.

USAGE

align2eigen [ selection [, state ]]

ARGUMENTS
selectionstr, optional

Atoms selection.

stateint, default = 0

Which state to consider.

flat.editing.align2points(selection='all', pk1='(pk1)', pk2='(pk2)', pk3='(pk3)', state=0, *, _self=cmd)
DESCRIPTION

Align selection with three selected point i.e. angle formed by selections (pk1), (pk2), and (pk3) which can be set using the PkAt mouse action (typically, Ctrl + middle-click).

New vector base is defined as:

  y (pk3)
  |
  |
(pk2) -- x (pk1)
 /
z
USAGE

align2points [ selection [, pk1, [, pk2 [, pk3, [, state ]]]]]

ARGUMENTS
selectionstr, optional

Atoms selection.

pk1, pk2, pk3str, default = ‘(pk1)’, ‘(pk2)’, ‘(pk2)’

Points that will be used to define new orthonormal base.

stateint, default = 0

Which state to consider.

flat.editing.copy_identifiers(target, source, identifiers='segi chain resi', match='align', *, _self=cmd)
DESCRIPTION

Transfers identifiers e.g. segi, chain, and resi from one selection to another. This works by mapping old to new identifiers and alters also not aligned atoms (works if any other atom from the same residue got aligned).

USAGE

copy_identifiers target, source [, identifiers [, match ]]

ARGUMENTS
targetstr

Target selection.

sourcestr

Source selection.

identifiersstr, default = ‘segi chain resi’

Identifiers to copy. Separator is optional.

matchstr, default = ‘align’

Method how to match atoms.

SOURCE

From PSICO (c) 2011 Thomas Holder, MPI for Developmental Biology

flat.editing.remove_alt(selection='all', keep='first', quiet=1, *, _self=cmd)
DESCRIPTION

Remove alternative location atoms.

USAGE

remove_alt [ selection [, keep ]]

ARGUMENTS
selectionstr

Atom selection.

keepstr | int, default = ‘first’

AltLoc to keep, or first to keep the first observed AltLoc

SOURCE

From PSICO (c) 2011 Thomas Holder, MPI for Developmental Biology

flat.editing.renumber(selection, start=1, *, quiet=0, _self=cmd)
DESCRIPTION

Renumber sets new residue numbers (resi) for a polymer based on connectivity.

USAGE

renumber selection [, start ]

ARGUMENTS
selectionstr

Atom selection.

startint, default = 1

Numbering start.

RETURNS
: Tuple(int, int)

First and last index in renumbering.

flat.editing.split(operator, selection='all', name='obj', *, _self=cmd)
DESCRIPTION

Create a single object for each entity in selection, defined by operator (e.g. bymolecule, bysegment, …). Returns the number of created objects.

USAGE

split operator [, selection [, name ]]

ARGUMENTS
operatorstr

Operator to split selection by (e.g. bymolecule).

selectionstr, optional

Atoms selection.

namestr, default = ‘obj’

Name of generated object(s).

RETURNS
: int

Number of created objects.

SOURCE

From PSICO (c) 2011 Thomas Holder, MPI for Developmental Biology

flat.editing.unwrap(selection='all', mode='chains', *, _self=cmd)
DESCRIPTION

Move all atoms in an selection so that bonds don’t split over images:

+-----------+        +-----------+
|-3-4   1-2-|  -->   |       1-2-|-3-4
+-----------+        +-----------+
USAGE

unwrap [ selection [, mode ]]

ARGUMENTS
selectionstr, optional

Atoms selection.

modestr, default = ‘chains’

The group which will be kept together through the shifting process: residues, chains, segments, or bonds.

flat.editing.wrap(selection='all', *, _self=cmd)
DESCRIPTION

Shift the contents of a given selection back into the unit cell:

+-----------+            +-----------+
|       1-2-|-3-4  -->   |-3-4   1-2-|
+-----------+            +-----------+
USAGE

wrap [ selection ]

ARGUMENTS
selectionstr, optional

Atoms selection.