BALL  1.5.0
Classes | Public Types | List of all members
BALL::SDGenerator Class Reference

#include <BALL/STRUCTURE/sdGenerator.h>

Classes

class  AtomComparator
 
struct  Default
 Default values for options. More...
 
struct  Option
 Option names. More...
 

Public Types

enum  Property {
  FIRST_SDGENERATOR_PROPERTY = PDBAtom::NUMBER_OF_PROPERTIES+1, IN_RING, CORE_CHAIN, DEPOSITED,
  FXAS, EQAS, HEAD, EDGE,
  ASSEMBLED, ZIG, ZAG, INITIALIZED_HEAD_CFS,
  LAST_SDGENERATOR_PROPERTY
}
 Properties, used to describe atoms and their status. More...
 

Public Member Functions

Constructors and Destructors.
 SDGenerator (bool show_hydrogens=false)
 
virtual ~SDGenerator ()
 

Public Attributes

Public Attributes
Options options
 options More...
 

Accessors

RingAnalyser ring_analyser_
 The ring analyser containing all information about ring systems. More...
 
std::list< std::list< Atom * > > chains_
 all chains More...
 
std::priority_queue< Atom *, std::vector< Atom * >, AtomComparatorredraw_queue_
 our redraw queue More...
 
Systemsystem_
 the system we are working on More...
 
void setDefaultOptions ()
 
void generateSD (System &molecule_sys)
 Generates a structure Diagram from the input System. More...
 
void clear ()
 
void prepare_ ()
 Distinguishes between ring-atoms and core-chain-atoms, removes all H-Atoms from the System. More...
 
void constructRingSystem_ (Position current_ring_system)
 Constructs a ringsystem, providing the atoms with relative 2D-coordinates, starting in the point of origin. More...
 
Angle getCFS_ (Atom const *atom, bool hi)
 
Angle computeCFS_ (Vector3 const &input)
 
void setCFS_ (Atom *atom, Angle cfs, bool high)
 
void pushCFS_ (Atom *atom)
 
Angle getBackupCFS_ (Atom const *, bool hi)
 
void computeCoreCFS_ (RingAnalyser::Ring &ring, bool clockwise)
 
Angle computeAngularSeparation_ (Atom *seed)
 
Angle computeAngularDemand_ (Atom *seed)
 
std::vector< Atom * > sequenceSubstituents_ (Atom *seed)
 
void computeShelleyPriorities_ ()
 
void buildRegularPolygon_ (RingAnalyser::Ring &ring, Position first_anchor_index, bool clockwise)
 
void buildOpenPolygon_ (RingAnalyser::Ring &ring, Position first_anchor_index, Position second_anchor_index)
 
void attachCore_ (Position current_ring, std::vector< RingAnalyser::Ring > &current_system, float x_start)
 construct the core-ring as a regular polygon More...
 
void attachTemplate_ (Position current_ring, std::vector< RingAnalyser::Ring > &current_system)
 attach a ring template to a (partially) constructed ringsystem (no functionality yet) More...
 
void attachFused_ (Position current_ring, std::vector< RingAnalyser::Ring > &current_system)
 attach a fused ring to a (partially) constructed ringsystem More...
 
void attachBridged_ (Position current_ring, std::vector< RingAnalyser::Ring > &current_system)
 attach a bridged ring to a (partially) constructed ringsystem More...
 
void attachSpiro_ (Position current_ring, std::vector< RingAnalyser::Ring > &current_system)
 attach a spiro ring to a (partially) constructed ringsystem More...
 
void computeAdjacencyMatrix_ (std::vector< Atom * > &chain, std::vector< bool > &result)
 Compute adjacency matrix of the given atoms. More...
 
void treatChains_ ()
 cluster and arrange all chains in the system More...
 
void smoothCFSAngle_ (Atom *seed)
 
void placeSubstituent_ (Atom *seed, Atom *head, Atom *next)
 
void depositPFU_ (Atom *seed_atom, Atom *next_neighbour)
 
void checkOverlap_ (Atom *atom)
 
bool ringIsClockwise_ (const RingAnalyser::Ring &ring, Index start_index=0) const
 
void assembleSD_ ()
 
void findFloydWarshallPath_ (std::vector< int > &path, std::vector< Index > &next, Size remaining_atoms, Position i, Position j, std::list< Index > &output)
 
static bool compareChains_ (const vector< Atom * > &x, const vector< Atom * > &y)
 Comparator for chains of atoms. More...
 

Detailed Description

Structure Diagram Generation.

This class provides methods for analysis of the input.

Definition at line 33 of file sdGenerator.h.

Member Enumeration Documentation

◆ Property

Properties, used to describe atoms and their status.

Enumerator
FIRST_SDGENERATOR_PROPERTY 
IN_RING 
CORE_CHAIN 
DEPOSITED 
FXAS 
EQAS 
HEAD 
EDGE 
ASSEMBLED 
ZIG 
ZAG 
INITIALIZED_HEAD_CFS 
LAST_SDGENERATOR_PROPERTY 

Definition at line 40 of file sdGenerator.h.

Constructor & Destructor Documentation

◆ SDGenerator()

BALL::SDGenerator::SDGenerator ( bool  show_hydrogens = false)

Default-Constructor

◆ ~SDGenerator()

virtual BALL::SDGenerator::~SDGenerator ( )
virtual

Destructor

Member Function Documentation

◆ assembleSD_()

void BALL::SDGenerator::assembleSD_ ( )
protected

Assemble the final structure diagram

◆ attachBridged_()

void BALL::SDGenerator::attachBridged_ ( Position  current_ring,
std::vector< RingAnalyser::Ring > &  current_system 
)
protected

attach a bridged ring to a (partially) constructed ringsystem

Parameters
current_ringthe index of the ring to attach
current_systemthe index of the ring system

◆ attachCore_()

void BALL::SDGenerator::attachCore_ ( Position  current_ring,
std::vector< RingAnalyser::Ring > &  current_system,
float  x_start 
)
protected

construct the core-ring as a regular polygon

Parameters
current_ringthe index of the ring to attach
current_systemthe ring system
x_startthe ring is created in (x_start, 0, 0)

◆ attachFused_()

void BALL::SDGenerator::attachFused_ ( Position  current_ring,
std::vector< RingAnalyser::Ring > &  current_system 
)
protected

attach a fused ring to a (partially) constructed ringsystem

Parameters
current_ringthe index of the ring to attach
current_systemthe index of the ring system

◆ attachSpiro_()

void BALL::SDGenerator::attachSpiro_ ( Position  current_ring,
std::vector< RingAnalyser::Ring > &  current_system 
)
protected

attach a spiro ring to a (partially) constructed ringsystem

Parameters
current_ringthe index of the ring to attach
current_systemthe index of the ring system

◆ attachTemplate_()

void BALL::SDGenerator::attachTemplate_ ( Position  current_ring,
std::vector< RingAnalyser::Ring > &  current_system 
)
protected

attach a ring template to a (partially) constructed ringsystem (no functionality yet)

Parameters
current_ringthe index of the ring to attach
current_systemthe ring system

◆ buildOpenPolygon_()

void BALL::SDGenerator::buildOpenPolygon_ ( RingAnalyser::Ring ring,
Position  first_anchor_index,
Position  second_anchor_index 
)
protected

Build an open polygon for a ring with two fixed points.

◆ buildRegularPolygon_()

void BALL::SDGenerator::buildRegularPolygon_ ( RingAnalyser::Ring ring,
Position  first_anchor_index,
bool  clockwise 
)
protected

Build a regular polygon for a ring with two fixed points.

◆ checkOverlap_()

void BALL::SDGenerator::checkOverlap_ ( Atom atom)
protected

◆ clear()

void BALL::SDGenerator::clear ( )

Clear all internal data structures.

◆ compareChains_()

static bool BALL::SDGenerator::compareChains_ ( const vector< Atom * > &  x,
const vector< Atom * > &  y 
)
staticprotected

Comparator for chains of atoms.

◆ computeAdjacencyMatrix_()

void BALL::SDGenerator::computeAdjacencyMatrix_ ( std::vector< Atom * > &  chain,
std::vector< bool > &  result 
)
protected

Compute adjacency matrix of the given atoms.

◆ computeAngularDemand_()

Angle BALL::SDGenerator::computeAngularDemand_ ( Atom seed)
protected

◆ computeAngularSeparation_()

Angle BALL::SDGenerator::computeAngularSeparation_ ( Atom seed)
protected

◆ computeCFS_()

Angle BALL::SDGenerator::computeCFS_ ( Vector3 const &  input)
protected

◆ computeCoreCFS_()

void BALL::SDGenerator::computeCoreCFS_ ( RingAnalyser::Ring ring,
bool  clockwise 
)
protected

◆ computeShelleyPriorities_()

void BALL::SDGenerator::computeShelleyPriorities_ ( )
protected

Compute the Shelley priority values for each atom

◆ constructRingSystem_()

void BALL::SDGenerator::constructRingSystem_ ( Position  current_ring_system)
protected

Constructs a ringsystem, providing the atoms with relative 2D-coordinates, starting in the point of origin.

Parameters
current_ring_systemconsecutive numbering of the molecule's ringsystems

◆ depositPFU_()

void BALL::SDGenerator::depositPFU_ ( Atom seed_atom,
Atom next_neighbour 
)
protected

◆ findFloydWarshallPath_()

void BALL::SDGenerator::findFloydWarshallPath_ ( std::vector< int > &  path,
std::vector< Index > &  next,
Size  remaining_atoms,
Position  i,
Position  j,
std::list< Index > &  output 
)
protected

◆ generateSD()

void BALL::SDGenerator::generateSD ( System molecule_sys)

Generates a structure Diagram from the input System.

Parameters
molecule_sys

◆ getBackupCFS_()

Angle BALL::SDGenerator::getBackupCFS_ ( Atom const *  ,
bool  hi 
)
protected

◆ getCFS_()

Angle BALL::SDGenerator::getCFS_ ( Atom const *  atom,
bool  hi 
)
protected

◆ placeSubstituent_()

void BALL::SDGenerator::placeSubstituent_ ( Atom seed,
Atom head,
Atom next 
)
protected

◆ prepare_()

void BALL::SDGenerator::prepare_ ( )
protected

Distinguishes between ring-atoms and core-chain-atoms, removes all H-Atoms from the System.

Parameters
molecule_sys

◆ pushCFS_()

void BALL::SDGenerator::pushCFS_ ( Atom atom)
protected

◆ ringIsClockwise_()

bool BALL::SDGenerator::ringIsClockwise_ ( const RingAnalyser::Ring ring,
Index  start_index = 0 
) const
protected

◆ sequenceSubstituents_()

std::vector<Atom*> BALL::SDGenerator::sequenceSubstituents_ ( Atom seed)
protected

◆ setCFS_()

void BALL::SDGenerator::setCFS_ ( Atom atom,
Angle  cfs,
bool  high 
)
protected

◆ setDefaultOptions()

void BALL::SDGenerator::setDefaultOptions ( )

Resets the options to default values.

◆ smoothCFSAngle_()

void BALL::SDGenerator::smoothCFSAngle_ ( Atom seed)
protected

◆ treatChains_()

void BALL::SDGenerator::treatChains_ ( )
protected

cluster and arrange all chains in the system

Member Data Documentation

◆ chains_

std::list<std::list<Atom*> > BALL::SDGenerator::chains_
protected

all chains

Definition at line 264 of file sdGenerator.h.

◆ options

Options BALL::SDGenerator::options

options

Definition at line 101 of file sdGenerator.h.

◆ redraw_queue_

std::priority_queue<Atom*, std::vector<Atom*>, AtomComparator> BALL::SDGenerator::redraw_queue_
protected

our redraw queue

Definition at line 267 of file sdGenerator.h.

◆ ring_analyser_

RingAnalyser BALL::SDGenerator::ring_analyser_
protected

The ring analyser containing all information about ring systems.

Definition at line 261 of file sdGenerator.h.

◆ system_

System* BALL::SDGenerator::system_
protected

the system we are working on

Definition at line 270 of file sdGenerator.h.