EditorBase Class Reference

base class for entity editors More...

#include <editor_base.hh>

Inherited by ICSEditor, and XCSEditor.


Public Member Functions

ChainHandle InsertChain (const String &chain_name)
BondHandle Connect (const AtomHandle &first, const AtomHandle &second)
BondHandle Connect (const AtomHandle &first, const AtomHandle &second, unsigned char bond_order)
BondHandle Connect (const AtomHandle &first, const AtomHandle &second, Real len, Real theta, Real phi)
BondHandle Connect (const AtomHandle &first, const AtomHandle &second, Real len, Real theta, Real phi, unsigned char bond_order)
void RenameChain (ChainHandle chain, const String &new_name)
void DeleteAllAtoms (ResidueHandle res)
void DeleteAtom (const AtomHandle &atom)
TorsionHandle AddTorsion (const String &name, const AtomHandle &a1, const AtomHandle &a2, const AtomHandle &a3, const AtomHandle &a4)
void DeleteChain (const ChainHandle &chain)
void DeleteResidue (const ResidueHandle &residue_handle)
EditMode GetMode () const
Inserting, removing and modifying order of residues
Append residue to the end of the chain

Append residue with residue key

ResidueHandle AppendResidue (ChainHandle chain, const ResidueKey &k)
ResidueHandle AppendResidue (ChainHandle chain, const ResidueKey &k, const ResNum &num)
ResidueHandle InsertResidueBefore (ChainHandle chain, int index, const ResNum &num, const ResidueKey &k)
ResidueHandle InsertResidueAfter (ChainHandle chain, int index, const ResNum &num, const ResidueKey &k)
Adding/removing atoms
AtomHandle InsertAtom (ResidueHandle residue, const String &name, const geom::Vec3 &pos, const AtomProp &prop=AtomProp())
AtomHandle InsertAltAtom (ResidueHandle residue, const String &name, const String &alt_group, const geom::Vec3 &pos, const AtomProp &prop=AtomProp())
void AddAltAtomPos (const String &group, const AtomHandle &atom, const geom::Vec3 &position)

Protected Member Functions

 EditorBase (const EntityHandle &ent, EditMode mode)
void UpdateTrace ()

Protected Attributes

EntityHandle ent_
EditMode mode_


Detailed Description

base class for entity editors

Entities, chains, residues and atoms are assembled and modified via editors. Editors are usually used as one of the concrete subclasses of EditorBase: XCSEditor and ICSEditor. The former operates on the external carthesian coordinate system while the latter operates on the internal coordinate system. To create a new editor, use EntityHandle::RequestXCSEditor() and EntityHandle::RequestICSEditor(), respectively.

For an introduction to the concept of editors go here

Definition at line 47 of file editor_base.hh.


Constructor & Destructor Documentation

EditorBase ( const EntityHandle ent,
EditMode  mode 
) [protected]


Member Function Documentation

void AddAltAtomPos ( const String group,
const AtomHandle atom,
const geom::Vec3 position 
)

Add alternative atom position.

Parameters:
group is the name of the alternative atom position group. If no group of that name exists, it will be created.
atom is the atom handle the additional location belongs to. It is required that the atom has been inserted via InsertAltAtom, If the atom is a conventional atom without alternative location, a Error will be thrown.
position is the alternative position
See also:
EditorBase::InsertAltAtom(), ResidueHandle

TorsionHandle AddTorsion ( const String name,
const AtomHandle a1,
const AtomHandle a2,
const AtomHandle a3,
const AtomHandle a4 
)

Add named torsion to entity.

ResidueHandle AppendResidue ( ChainHandle  chain,
const ResidueKey k,
const ResNum num 
)

ResidueHandle AppendResidue ( ChainHandle  chain,
const ResidueKey k 
)

BondHandle Connect ( const AtomHandle first,
const AtomHandle second,
Real  len,
Real  theta,
Real  phi,
unsigned char  bond_order 
)

BondHandle Connect ( const AtomHandle first,
const AtomHandle second,
Real  len,
Real  theta,
Real  phi 
)

BondHandle Connect ( const AtomHandle first,
const AtomHandle second,
unsigned char  bond_order 
)

BondHandle Connect ( const AtomHandle first,
const AtomHandle second 
)

connect two atoms with bond

If there is already a bond between the two atoms, no new bond is created. Instead, the already existing bond is returned.

void DeleteAllAtoms ( ResidueHandle  res  ) 

Delete all atoms of residue.

All associated torsions and bonds will also be removed

void DeleteAtom ( const AtomHandle atom  ) 

Delete specific atom from this residue.

All associated torsions and bonds will also be removed as well.

Parameters:
atom is the atom to remove. If no such atom exists, this method will have no effect

void DeleteChain ( const ChainHandle chain  ) 

delete chain

all associated atoms, residues, torsions and bonds will also be deleted.

void DeleteResidue ( const ResidueHandle residue_handle  ) 

Delete residue.

Atoms, bonds and torsions involving this residue are removed as well

See also:
ChainHandle::DeleteResidue, DeleteAtom

EditMode GetMode (  )  const

Get edit mode of editor.

AtomHandle InsertAltAtom ( ResidueHandle  residue,
const String name,
const String alt_group,
const geom::Vec3 pos,
const AtomProp prop = AtomProp() 
)

Insert new atom with alternative position indicator.

See also:
EditorBase::AddAltAtomPos(), ResidueHandle

AtomHandle InsertAtom ( ResidueHandle  residue,
const String name,
const geom::Vec3 pos,
const AtomProp prop = AtomProp() 
)

Insert new atom.

Insert new atom and add it to residue. For atoms with alternative atom locations use ResidueHandle::InsertAltAtom().

Parameters:
residue is the parent residue
name is the atom name. While free to choose a name, it is adviced to properly name the residues according to IUPAC rules as several algorithms as well as most builders in the conop module rely on proper naming.
pos is the position of the atom in global coordinates
prop are the atom's properties such as element, van der Waals radius charge and so on. The default set of atom properties is rather meaningless

ChainHandle InsertChain ( const String chain_name  ) 

create new chain

create new chain and attach it to entity.

Parameters:
chain_name The chain name. Can be an arbitrary String. However, if you intend to use the PDB export funtionality, the chain_name should be a single letter, preferably in the range A-Z.
Returns:
The newly created chain handle

ResidueHandle InsertResidueAfter ( ChainHandle  chain,
int  index,
const ResNum num,
const ResidueKey k 
)

insert residue into chain

This method is identical to InsertResidueBefore() but inserts the residue after the specified position

See also:
InsertResidueBefore

ResidueHandle InsertResidueBefore ( ChainHandle  chain,
int  index,
const ResNum num,
const ResidueKey k 
)

void RenameChain ( ChainHandle  chain,
const String new_name 
)

void UpdateTrace (  )  [protected]


Field Documentation

EntityHandle ent_ [protected]

Definition at line 193 of file editor_base.hh.

EditMode mode_ [protected]

Definition at line 194 of file editor_base.hh.


The documentation for this class was generated from the following file:

Generated on Fri Jul 2 14:23:07 2010 for OpenStructure by  doxygen 1.5.8