Develop Biology
The language of life
bio::molecular::Pathway Class Reference

#include <Pathway.h>

+ Inheritance diagram for bio::molecular::Pathway:
+ Collaboration diagram for bio::molecular::Pathway:

Public Member Functions

 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, Pathway) BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS(chemical
 
chemical::ReactionPerspective::Instance ()
 
 filter::Chemical ()) virtual ~Pathway()
 
virtual chemical::Products Process (chemical::Reactants *reactants)
 
virtual bool ReactantsMeetRequirements (const chemical::Reactants *toCheck) const
 
- Public Member Functions inherited from bio::chemical::Class< Pathway >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Pathway) Class(Pathway *object
 
- Public Member Functions inherited from bio::physical::Class< T >
 Class (T *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
T * Convert (Wave *wave)
 
virtual operator T* ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::physical::Wave
 Wave (Symmetry *symmetry=NULL)
 
virtual ~Wave ()
 
virtual chemical::AtomAsAtom ()
 
virtual const chemical::AtomAsAtom () const
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual Code Attenuate (const Wave *other)
 
virtual WaveClone () const
 
virtual WaveDemodulate ()
 
virtual const WaveDemodulate () const
 
virtual Code Disattenuate (const Wave *other)
 
virtual Properties GetProperties () const
 
virtual WaveModulate (Wave *signal)
 
virtual Waveoperator* ()
 
virtual const Waveoperator* () const
 
virtual Waveoperator* (Wave *signal)
 
virtual void operator+ (const Wave *other)
 
virtual void operator- (const Wave *other)
 
virtual void operator| (Symmetry *symmetry)
 
virtual Code Reify (Symmetry *symmetry)
 
virtual SymmetrySpin () const
 
- Public Member Functions inherited from bio::physical::Identifiable< StandardDimension >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Identifiable< StandardDimension >) explicit Identifiable(Perspective< StandardDimension > *perspective
 
void CloneIntoName (Name name)
 
- Public Member Functions inherited from bio::physical::Observer< Perspective< StandardDimension > >
 Observer (const Observer &other)
 
 Observer (Perspective *perspective=NULL)
 
virtual ~Observer ()
 
virtual PerspectiveGetPerspective () const
 
virtual void SetPerspective (Perspective *perspective)
 
- Public Member Functions inherited from bio::physical::Class< Identifiable< StandardDimension > >
 Class (Identifiable< StandardDimension > *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Identifiable< StandardDimension > * Convert (Wave *wave)
 
virtual operator Identifiable< StandardDimension > * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::log::Writer
 Writer (Engine *logEngine, Filter logFilter)
 
virtual ~Writer ()
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Writer) Writer()
 
void ExternalLog (Filter logFilter, Level level, const char *format,...) const
 
EngineGetLogEngine ()
 
const EngineGetLogEngine () const
 
bool HasLogEngine () const
 
virtual void SetLogEngine (Engine *logEngine)
 
- Public Member Functions inherited from bio::physical::Filterable
 Filterable (Filter filter)
 
virtual ~Filterable ()
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Filterable) Filterable()
 
Filter GetFilter () const
 
virtual void InitializeImplementation (ByteStreams args)
 
virtual Code Reify (Symmetry *symmetry)
 
virtual void SetFilter (Filter filter)
 
virtual SymmetrySpin () const
 
- Public Member Functions inherited from bio::physical::Class< Filterable >
 Class (Filterable *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
FilterableConvert (Wave *wave)
 
virtual operator Filterable * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::physical::Class< Writer >
 Class (Writer *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Writer * Convert (Wave *wave)
 
virtual operator Wave * ()
 
virtual operator Writer * ()
 
- Public Member Functions inherited from bio::chemical::Atom
 Atom (const Atom &other)
 
virtual ~Atom ()
 
template<typename T >
As ()
 
template<typename T >
const T As () const
 
template<typename T >
AsBonded ()
 
template<typename T >
const T AsBonded () const
 
template<typename T >
AsBondedQuantum ()
 
template<typename T >
const T AsBondedQuantum () const
 
virtual Code Attenuate (const Wave *other)
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Atom) explicit Atom()
 
template<typename T >
bool BreakBond (T toDisassociate, BondType type=bond_type::Unknown())
 
virtual Code Disattenuate (const Wave *other)
 
template<typename T >
bool FormBond (T toBond, BondType type=bond_type::Unknown())
 
BondsGetAllBonds ()
 
const BondsGetAllBonds () const
 
WaveGetBonded (Valence position)
 
const WaveGetBonded (Valence position) const
 
template<typename T >
Valence GetBondPosition () const
 
Valence GetBondPosition (AtomicNumber bondedId) const
 
Valence GetBondPosition (Name typeName) const
 
template<typename T >
BondType GetBondType () const
 
BondType GetBondType (Valence position) const
 
template<typename T >
 operator T ()
 
virtual Code Reify (physical::Symmetry *symmetry)
 
virtual physical::SymmetrySpin () const
 
- Public Member Functions inherited from bio::physical::Class< Atom >
 Class (Atom *object, Symmetry *symmetry=NULL)
 
virtual ~Class ()
 
virtual WaveAsWave ()
 
virtual const WaveAsWave () const
 
virtual WaveClone () const
 
Atom * Convert (Wave *wave)
 
virtual operator Atom * ()
 
virtual operator Wave * ()
 
- Public Member Functions inherited from bio::chemical::Reaction
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, Reaction) BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS(chemical
 
 filter::Chemical ()
 
virtual Products operator() (Reactants *reactants) const
 
virtual Products Process (Reactants *reactants) const
 
virtual bool ReactantsMeetRequirements (const Reactants *toCheck) const
 
ReactionPerspective::Instance ()
 
template<typename T >
void Require ()
 
template<typename T >
void Require (const T *substance)
 
template<typename T >
void Require (const typename UnorderedMotif< Property >::Contents *properties, const typename UnorderedMotif< State >::Contents *states)
 
void Require (Name typeName, const Substance *substance)
 
void Require (Name typeName, const typename UnorderedMotif< Property >::Contents *properties, const typename UnorderedMotif< State >::Contents *states)
 
virtual void Require (Reactant *reactant)
 
 symmetry_type::Operation ()) explicit Reaction(Name name
 
- Public Member Functions inherited from bio::chemical::Class< Reaction >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, Reaction) Class(Reaction *object
 
- Public Member Functions inherited from bio::chemical::Structure
 Structure ()
 
virtual ~Structure ()
 
- Public Member Functions inherited from bio::chemical::UnorderedStructureInterface
 UnorderedStructureInterface ()
 
virtual ~UnorderedStructureInterface ()
 
template<typename T >
Add (const T t)
 
template<typename T >
void Clear ()
 
template<typename T >
ContainerGetAll ()
 
template<typename T >
const ContainerGetAll () const
 
template<typename T >
std::vector< T > GetAllAsVector ()
 
template<typename T >
const std::vector< T > GetAllAsVector () const
 
template<typename T >
unsigned long GetCount () const
 
template<typename T >
unsigned int GetNumMatching (const Container *other) const
 
template<typename T >
std::string GetStringFrom (std::string separator=", ")
 
template<typename T >
bool Has (T content) const
 
template<typename T >
bool HasAll (const Container *contents) const
 
template<typename T >
void Import (const std::vector< T > &other)
 
template<typename T >
void Import (const UnorderedMotif< T > *other)
 
Code ImportAll (const physical::Wave *other)
 
template<typename T >
Remove (const T t)
 
- Public Member Functions inherited from bio::ThreadSafe
 ThreadSafe ()
 
 ThreadSafe (const ThreadSafe &toCopy)
 
virtual ~ThreadSafe ()
 
void LockThread () const
 
void UnlockThread () const
 
- Public Member Functions inherited from bio::chemical::LinearStructureInterface
 LinearStructureInterface ()
 
virtual ~LinearStructureInterface ()
 
template<typename T >
Emission ForEach (ExcitationBase *excitation)
 
template<typename T >
GetById (StandardDimension id)
 
template<typename T >
const T GetById (StandardDimension id) const
 
template<typename T >
GetByName (Name name)
 
template<typename T >
const T GetByName (Name name) const
 
template<typename T >
GetOrCreateById (StandardDimension id)
 
template<typename T >
GetOrCreateByName (Name name)
 
template<typename T >
Code Insert (T toAdd, const Position position=BOTTOM, const StandardDimension optionalPositionArg=0, const bool transferSubContents=false)
 
- Public Member Functions inherited from bio::chemical::LinearMotif< chemical::Reaction * >
 LinearMotif (const Contents *contents, physical::Perspective< StandardDimension > *perspective=NULL)
 
 LinearMotif (const LinearMotif< chemical::Reaction * > &toCopy)
 
 LinearMotif (physical::Perspective< StandardDimension > *perspective=NULL)
 
virtual ~LinearMotif ()
 
virtual chemical::ReactionAddImplementation (chemical::Reaction * content)
 
virtual Code Attenuate (const physical::Wave *other)
 
 BIO_DISAMBIGUATE_REQUIRED_CLASS_METHODS (chemical, LinearMotif< chemical::Reaction * >) BIO_DISAMBIGUATE_OPTIONAL_CLASS_METHODS(physical
 
virtual void ClearImplementation ()
 
virtual chemical::ReactionCreateImplementation (StandardDimension id)
 
virtual Code Disattenuate (const physical::Wave *other)
 
virtual Emission ForEachImplementation (ExcitationBase *excitation)
 
virtual chemical::ReactionGetByIdImplementation (StandardDimension id)
 
virtual const chemical::ReactionGetByIdImplementation (StandardDimension id) const
 
virtual chemical::ReactionGetByNameImplementation (Name name)
 
virtual const chemical::ReactionGetByNameImplementation (Name name) const
 
virtual chemical::ReactionGetOrCreateByIdImplementation (StandardDimension id)
 
virtual chemical::ReactionGetOrCreateByNameImplementation (Name name)
 
virtual std::string GetStringFromImplementation (std::string separator=", ")
 
physical::Perspective< StandardDimension > * GetStructuralPerspective ()
 
const physical::Perspective< StandardDimension > * GetStructuralPerspective () const
 
virtual bool HasImplementation (const chemical::Reaction * &content) const
 
virtual void ImportImplementation (const LinearMotif< chemical::Reaction * > *other)
 
virtual Code InsertImplementation (chemical::Reaction * toAdd, const Position position=BOTTOM, const StandardDimension optionalPositionArg=0, const bool transferSubContents=false)
 
- Public Member Functions inherited from bio::chemical::Elementary< LinearMotif< chemical::Reaction * > >
 Elementary ()
 
 Elementary (const Properties properties)
 
virtual ~Elementary ()
 
void RegisterProperties (const Properties properties)
 
- Public Member Functions inherited from bio::chemical::Class< LinearMotif< chemical::Reaction * > >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, LinearMotif< chemical::Reaction * >) Class(LinearMotif< chemical::Reaction * > *object
 
- Public Member Functions inherited from bio::chemical::UnorderedMotif< chemical::Reaction * >
 UnorderedMotif (const Contents *contents)
 
 UnorderedMotif (const UnorderedMotif< chemical::Reaction * > *toCopy)
 
virtual ~UnorderedMotif ()
 
virtual chemical::ReactionAddImplementation (const chemical::Reaction * content)
 
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (chemical, UnorderedMotif< chemical::Reaction * >) UnorderedMotif()
 
virtual void ClearImplementation ()
 
virtual unsigned long GetCountImplementation () const
 
virtual unsigned int GetNumMatchingImplementation (const Container *other) const
 
virtual std::string GetStringFromImplementation (std::string separator=", ")
 
virtual bool HasAllImplementation (const Container *contents) const
 
virtual bool HasImplementation (const chemical::Reaction * content) const
 
virtual void ImportImplementation (const UnorderedMotif< chemical::Reaction * > *other)
 
virtual chemical::ReactionRemoveImplementation (const chemical::Reaction * content)
 
- Public Member Functions inherited from bio::chemical::Class< UnorderedMotif< chemical::Reaction * > >
 BIO_DISAMBIGUATE_ALL_CLASS_METHODS (physical, UnorderedMotif< chemical::Reaction * >) Class(UnorderedMotif< chemical::Reaction * > *object
 
- Public Member Functions inherited from bio::chemical::AbstractMotif
 AbstractMotif ()
 
virtual ~AbstractMotif ()
 
virtual void ClearImplementation ()
 
virtual ContainerGetAllImplementation ()
 
virtual const ContainerGetAllImplementation () const
 
virtual unsigned long GetCountImplementation () const
 
virtual std::string GetStringFromImplementation (std::string separator=", ")
 
virtual void ImportImplementation (const void *other)
 

Public Attributes

 Pathway
 
- Public Attributes inherited from bio::chemical::Class< Pathway >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Public Attributes inherited from bio::physical::Identifiable< StandardDimension >
Id m_id
 
- Public Attributes inherited from bio::chemical::Reaction
 Reaction
 
const Reactantsreactants
 
- Public Attributes inherited from bio::chemical::Class< Reaction >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Public Attributes inherited from bio::chemical::LinearMotif< chemical::Reaction * >
physical::Perspective< StandardDimension > * m_perspective
 
- Public Attributes inherited from bio::chemical::Class< LinearMotif< chemical::Reaction * > >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 
- Public Attributes inherited from bio::chemical::Class< UnorderedMotif< chemical::Reaction * > >
physical::Perspective< StandardDimension > Filter filter
 
physical::Perspective< StandardDimension > * perspective
 

Additional Inherited Members

- Public Types inherited from bio::physical::Identifiable< StandardDimension >
typedef StandardDimension Id
 
typedef std::vector< IdIds
 
- Public Types inherited from bio::physical::Observer< Perspective< StandardDimension > >
typedef Perspective< StandardDimension > Perspective
 
- Public Types inherited from bio::chemical::LinearMotif< chemical::Reaction * >
typedef physical::Line Contents
 
- Public Types inherited from bio::chemical::UnorderedMotif< chemical::Reaction * >
typedef physical::Arrangement< chemical::Reaction * > Contents
 
- Static Public Member Functions inherited from bio::physical::Wave
static Properties GetResonanceBetween (const Wave *wave, const Properties &properties)
 
static Properties GetResonanceBetween (const Wave *wave1, const Wave *wave2)
 
static Properties GetResonanceBetween (ConstWaves waves)
 
- Static Public Member Functions inherited from bio::chemical::Reaction
template<typename T >
static Products Attempt (Reactants *reactants)
 
template<typename T >
static Products Attempt (Substance *reactant1, Substance *reactant2=NULL, Substance *reactant3=NULL)
 
template<typename T >
static Products Attempt (Substances &substances)
 
template<typename T >
static const T * Initiate ()
 
static const ReactionInitiate (StandardDimension id)
 
- Static Public Member Functions inherited from bio::chemical::LinearMotif< chemical::Reaction * >
static LinearMotif< chemical::Reaction * > Properties GetClassProperties ()
 
- Static Public Member Functions inherited from bio::chemical::AbstractMotif
static Properties GetClassProperties ()
 
- Static Public Attributes inherited from bio::chemical::Elementary< LinearMotif< chemical::Reaction * > >
static bool hasRegistered
 
- Protected Member Functions inherited from bio::physical::Observer< Perspective< StandardDimension > >
virtual void InitializeImplementation (ByteStreams args)
 
- Protected Member Functions inherited from bio::VirtualBase
 VirtualBase ()
 
virtual ~VirtualBase ()
 
void Initialize (ByteStream arg1)
 
void Initialize (ByteStream arg1, ByteStream arg2)
 
void Initialize (ByteStream arg1, ByteStream arg2, ByteStream arg3)
 
void Initialize (ByteStreams args)
 
virtual void InitializeImplementation (ByteStreams args)=0
 
- Protected Member Functions inherited from bio::log::Writer
virtual void InitializeImplementation (ByteStreams args)
 
void Log (Level level, const char *format,...) const
 
- Protected Member Functions inherited from bio::chemical::Atom
virtual bool BreakBondImplementation (Wave *toDisassociate, AtomicNumber id, BondType type)
 
virtual bool FormBondImplementation (Wave *toBond, AtomicNumber id, BondType type)
 
- Protected Attributes inherited from bio::physical::Class< T >
T * m_object
 
- Protected Attributes inherited from bio::physical::Wave
Wavem_signal
 
Symmetrym_symmetry
 
- Protected Attributes inherited from bio::VirtualBase
bool m_hasBeenInitialized
 
- Protected Attributes inherited from bio::physical::Class< Identifiable< StandardDimension > >
Identifiable< StandardDimension > * m_object
 
- Protected Attributes inherited from bio::physical::Filterable
Filter m_filter
 
- Protected Attributes inherited from bio::physical::Class< Filterable >
Filterablem_object
 
- Protected Attributes inherited from bio::physical::Class< Writer >
Writer * m_object
 
- Protected Attributes inherited from bio::chemical::Atom
Bonds m_bonds
 
- Protected Attributes inherited from bio::physical::Class< Atom >
Atom * m_object
 
- Protected Attributes inherited from bio::chemical::Reaction
Reactants m_requiredReactants
 
- Protected Attributes inherited from bio::chemical::AbstractMotif
Containerm_contents
 

Detailed Description

A Pathway is a series chemical::Reactions that accomplishes some larger goal. Pathways, are themselves Reactions and can be invoked using the same calls (e.g. chemical::Reaction::Initiate<MyPathway>. NOTE: in real life, pathways often include protein-catalyzed reactions. You can do that here too!

NOTE: while Pathways are Reactions, they should not have any Requirements / Reactants nor should they perform any Process of their own. Instead, they should rely entirely on the Reactions added to them. With the above stated, Pathways can be treated like Reactions for the purpose of being added to other Pathways ;)

Pathways are First-In-First-Out (FIFO) ordered. The first call to Add<Reaction*>() will be the first Reaction run by this and the Reaction that determines the required Reactants to even begin *this Process. The last call to Add<Reaction>() will be the last Reaction called and will determine the ultimate Products returned by *this Process, should it successfully run to completion. i.e. return last(middle(first(reactants)));

TODO: Add switching logic for Products Code.

Definition at line 46 of file Pathway.h.

Member Function Documentation

◆ BIO_DISAMBIGUATE_ALL_CLASS_METHODS()

bio::molecular::Pathway::BIO_DISAMBIGUATE_ALL_CLASS_METHODS ( chemical  ,
Pathway   
)

Ensure virtual methods point to Class implementations. Standard ctors.

◆ chemical::ReactionPerspective::Instance()

& bio::molecular::Pathway::chemical::ReactionPerspective::Instance ( )

◆ filter::Chemical()

bio::molecular::Pathway::filter::Chemical ( )

◆ Process()

chemical::Products bio::molecular::Pathway::Process ( chemical::Reactants reactants)
virtual

The Process of a Pathway is the series of Reactions it includes. This is FIFO ordering (see class description for details).

Parameters
reactants
Returns
the Products from the last Reaction or a code::FailedReaction(), if any step did not succeed.

Definition at line 36 of file Pathway.cpp.

37{
39
40 chemical::Products products(reactants);
41 Reaction* reactionBuffer;
42 for (
43 SmartIterator rct = GetAll< Reaction* >()->Begin();
44 !rct.IsAtEnd();
45 ++rct
46 )
47 {
48 if (products == code::Success() && products != code::NoErrorNoSuccess())
49 {
50 chemical::Reactants nextReactants(products);
51 reactionBuffer = rct;
52 products = (*reactionBuffer)(&nextReactants);
53 }
54 else
55 {
56 break;
57 }
58 }
59 return products;
60}
#define BIO_SANITIZE(test, success, failure)
const Reactants * reactants
Definition: Reaction.h:101
Code NoErrorNoSuccess()
Code BadArgument1()
Code Success()

References bio::chemical::Reaction::Reaction, bio::code::BadArgument1(), BIO_SANITIZE, bio::SmartIterator::IsAtEnd(), bio::code::NoErrorNoSuccess(), bio::chemical::Reaction::reactants, and bio::code::Success().

◆ ReactantsMeetRequirements()

bool bio::molecular::Pathway::ReactantsMeetRequirements ( const chemical::Reactants toCheck) const
virtual

*this shouldn't have an Requirements / Reactants, so instead we check the first Reaction in *this.

Parameters
toCheck
Returns
whether or not the first Reaction in *this can use the given Substances.

Reimplemented from bio::chemical::Reaction.

Definition at line 62 of file Pathway.cpp.

63{
64 BIO_SANITIZE(GetCount< chemical::Reaction* >(),,return false)
65 return GetAll< chemical::Reaction* >()->Begin().As< chemical::Reaction* >()->ReactantsMeetRequirements(toCheck);
66}
virtual bool ReactantsMeetRequirements(const chemical::Reactants *toCheck) const
Definition: Pathway.cpp:62

References BIO_SANITIZE, and ReactantsMeetRequirements().

Referenced by ReactantsMeetRequirements().

Member Data Documentation

◆ Pathway

bio::molecular::Pathway::Pathway

Definition at line 61 of file Pathway.h.


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