libAntimony  2.8
antimony_api.h
Go to the documentation of this file.
1 
60 #ifndef ANTIMONY_API_H
61 #define ANTIMONY_API_H
62 
63 #ifndef LIBANTIMONY_VERSION_STRING //Should be defined in the makefile (from CMakeLists.txt)
64 #define LIBANTIMONY_VERSION_STRING "v2.8.0"
65 #endif
66 
67 #include "libutil.h"
68 #include "enums.h"
69 
70 BEGIN_C_DECLS
86 LIB_EXTERN long loadFile(const char* filename);
87 
99 LIB_EXTERN long loadString(const char* model);
100 
110 LIB_EXTERN long loadAntimonyFile(const char* filename);
111 
121 LIB_EXTERN long loadAntimonyString(const char* model);
122 
123 #ifndef NSBML
124 
135 LIB_EXTERN long loadSBMLFile(const char* filename);
136 
148 LIB_EXTERN long loadSBMLString(const char* model);
149 
162 LIB_EXTERN long loadSBMLStringWithLocation(const char* model, const char* location);
163 #endif
164 
165 #ifndef NCELLML
166 
177 LIB_EXTERN long loadCellMLFile(const char* filename);
178 
190 LIB_EXTERN long loadCellMLString(const char* model);
191 #endif
192 
193 
201 LIB_EXTERN unsigned long getNumFiles();
202 
207 LIB_EXTERN bool revertTo(long index);
208 
212 LIB_EXTERN void clearPreviousLoads();
213 
217 LIB_EXTERN void addDirectory(const char* directory);
218 
222 LIB_EXTERN void clearDirectories();
223 
224 
235 LIB_EXTERN int writeAntimonyFile(const char* filename, const char* moduleName);
236 
240 LIB_EXTERN char* getAntimonyString(const char* moduleName);
241 
242 #ifndef NSBML
243 
249 LIB_EXTERN int writeSBMLFile(const char* filename, const char* moduleName);
256 LIB_EXTERN char* getSBMLString(const char* moduleName);
257 
258 #ifdef USE_COMP
259 
265 LIB_EXTERN int writeCompSBMLFile(const char* filename, const char* moduleName);
272 LIB_EXTERN char* getCompSBMLString(const char* moduleName);
273 #endif //USE_COMP
274 #endif //NSBML
275 
276 #ifndef NCELLML
277 
283 LIB_EXTERN int writeCellMLFile(const char* filename, const char* moduleName);
290 LIB_EXTERN char* getCellMLString(const char* moduleName);
291 #endif
292 
293 /*
294  * Writes out a jarnac-formatted file containing a 'flattened' version of the current module (one where all the species and reactions are listed in the same model). This has *not* been very extensively tested, and many aspects of the model may be dropped. But the basics should be there. Returns 1 on success, 0 on failure (and sets an error).
295  */
296 //LIB_EXTERN int writeJarnacFile(const char* filename, const char* moduleName);
297 
298 /*
299  * Returns the same output as writeJarnacFile, but to a char* array instead of to a file.
300  */
301 //LIB_EXTERN char* getJarnacString(const char* moduleName);
302 
303 
307 LIB_EXTERN void printAllDataFor(const char* moduleName);
318 LIB_EXTERN bool checkModule(const char* moduleName);
319 
323 LIB_EXTERN char* getLastError();
324 
328 LIB_EXTERN char* getWarnings();
329 
330 #ifndef NSBML
331 
336 LIB_EXTERN char* getSBMLInfoMessages(const char* moduleName);
337 
343 LIB_EXTERN char* getSBMLWarnings(const char* moduleName);
344 #endif
345 
355 LIB_EXTERN unsigned long getNumModules();
356 
360 LIB_EXTERN char** getModuleNames();
361 
365 LIB_EXTERN char* getNthModuleName(unsigned long n);
366 
370 LIB_EXTERN char* getMainModuleName();
383 LIB_EXTERN unsigned long getNumSymbolsInInterfaceOf(const char* moduleName);
384 
388 LIB_EXTERN char** getSymbolNamesInInterfaceOf(const char* moduleName);
389 
393 LIB_EXTERN char* getNthSymbolNameInInterfaceOf(const char* moduleName, unsigned long n);
408 LIB_EXTERN unsigned long getNumReplacedSymbolNames(const char* moduleName);
409 
416 LIB_EXTERN char*** getAllReplacementSymbolPairs(const char* moduleName);
417 
423 LIB_EXTERN char** getNthReplacementSymbolPair(const char* moduleName, unsigned long n);
424 
430 LIB_EXTERN char* getNthFormerSymbolName(const char* moduleName, unsigned long n);
431 
437 LIB_EXTERN char* getNthReplacementSymbolName(const char* moduleName, unsigned long n);
438 
439 
445 LIB_EXTERN unsigned long getNumReplacedSymbolNamesBetween(const char* moduleName, const char* formerSubmodName, const char* replacementSubmodName);
446 
453 LIB_EXTERN char*** getAllReplacementSymbolPairsBetween(const char* moduleName, const char* formerSubmodName, const char* replacementSubmodName, unsigned long n);
454 
460 LIB_EXTERN char** getNthReplacementSymbolPairBetween(const char* moduleName, const char* formerSubmodName, const char* replacementSubmodName, unsigned long n);
461 
467 LIB_EXTERN char* getNthFormerSymbolNameBetween(const char* moduleName, const char* formerSubmodName, const char* replacementSubmodName, unsigned long n);
468 
474 LIB_EXTERN char* getNthReplacementSymbolNameBetween(const char* moduleName, const char* formerSubmodName, const char* replacementSubmodName, unsigned long n);
488 LIB_EXTERN unsigned long getNumSymbolsOfType(const char* moduleName, return_type rtype);
489 
493 LIB_EXTERN char** getSymbolNamesOfType(const char* moduleName, return_type rtype);
494 
498 LIB_EXTERN char** getSymbolDisplayNamesOfType(const char* moduleName, return_type rtype);
499 
514 LIB_EXTERN char** getSymbolEquationsOfType(const char* moduleName, return_type rtype);
515 
516 
529 LIB_EXTERN char** getSymbolInitialAssignmentsOfType(const char* moduleName, return_type rtype);
530 
543 LIB_EXTERN char** getSymbolAssignmentRulesOfType(const char* moduleName, return_type rtype);
544 
556 LIB_EXTERN char** getSymbolRateRulesOfType(const char* moduleName, return_type rtype);
557 
561 LIB_EXTERN char** getSymbolCompartmentsOfType(const char* moduleName, return_type rtype);
562 
566 LIB_EXTERN char* getNthSymbolNameOfType(const char* moduleName, return_type rtype, unsigned long n);
567 
571 LIB_EXTERN char* getNthSymbolDisplayNameOfType(const char* moduleName, return_type rtype, unsigned long n);
572 
576 LIB_EXTERN char* getNthSymbolEquationOfType(const char* moduleName, return_type rtype, unsigned long n);
577 
581 LIB_EXTERN char* getNthSymbolInitialAssignmentOfType(const char* moduleName, return_type rtype, unsigned long n);
582 
586 LIB_EXTERN char* getNthSymbolAssignmentRuleOfType(const char* moduleName, return_type rtype, unsigned long n);
587 
591 LIB_EXTERN char* getNthSymbolRateRuleOfType(const char* moduleName, return_type rtype, unsigned long n);
592 
596 LIB_EXTERN char* getNthSymbolCompartmentOfType(const char* moduleName, return_type rtype, unsigned long n);
597 
601 LIB_EXTERN return_type getTypeOfSymbol(const char* moduleName, const char* symbolName);
602 
606 LIB_EXTERN formula_type getTypeOfEquationForSymbol(const char* moduleName, const char* symbolName);
607 
611 LIB_EXTERN char* getCompartmentForSymbol(const char* moduleName, const char* symbolName);
622 LIB_EXTERN unsigned long getNumReactions(const char* moduleName);
623 
627 LIB_EXTERN unsigned long getNumReactants(const char* moduleName, unsigned long rxn);
628 
632 LIB_EXTERN unsigned long getNumProducts(const char* moduleName, unsigned long rxn);
633 
637 LIB_EXTERN char*** getReactantNames(const char* moduleName);
638 
642 LIB_EXTERN char** getNthReactionReactantNames(const char* modulename, unsigned long rxn);
643 
647 LIB_EXTERN char* getNthReactionMthReactantName(const char* modulename, unsigned long rxn, unsigned long reactant);
648 
652 LIB_EXTERN char*** getProductNames(const char* moduleName);
653 
657 LIB_EXTERN char** getNthReactionProductNames(const char* modulename, unsigned long rxn);
658 
662 LIB_EXTERN char* getNthReactionMthProductName(const char* modulename, unsigned long rxn, unsigned long product);
663 
667 LIB_EXTERN double** getReactantStoichiometries(const char* moduleName);
668 
672 LIB_EXTERN double** getProductStoichiometries(const char* moduleName);
673 
677 LIB_EXTERN double* getNthReactionReactantStoichiometries(const char* moduleName, unsigned long rxn);
678 
682 LIB_EXTERN double* getNthReactionProductStoichiometries(const char* moduleName, unsigned long rxn);
683 
687 LIB_EXTERN double getNthReactionMthReactantStoichiometries(const char* moduleName, unsigned long rxn, unsigned long reactant);
688 
692 LIB_EXTERN double getNthReactionMthProductStoichiometries(const char* moduleName, unsigned long rxn, unsigned long product);
693 
705 LIB_EXTERN unsigned long getNumInteractions(const char* moduleName);
706 
710 LIB_EXTERN unsigned long getNumInteractors(const char* moduleName, unsigned long rxn);
711 
715 LIB_EXTERN unsigned long getNumInteractees(const char* moduleName, unsigned long rxn);
716 
720 LIB_EXTERN char*** getInteractorNames(const char* moduleName);
721 
725 LIB_EXTERN char** getNthInteractionInteractorNames(const char* modulename, unsigned long rxn);
726 
730 LIB_EXTERN char* getNthInteractionMthInteractorName(const char* modulename, unsigned long interaction, unsigned long interactor);
731 
735 LIB_EXTERN char*** getInteracteeNames(const char* moduleName);
736 
740 LIB_EXTERN char** getNthInteractionInteracteeNames(const char* modulename, unsigned long rxn);
741 
745 LIB_EXTERN char* getNthInteractionMthInteracteeName(const char* modulename, unsigned long interaction, unsigned long interactee);
746 
750 LIB_EXTERN rd_type* getInteractionDividers(const char* moduleName);
751 
755 LIB_EXTERN rd_type getNthInteractionDivider(const char* moduleName, unsigned long n);
756 
767 LIB_EXTERN double** getStoichiometryMatrix(const char* moduleName);
768 
772 LIB_EXTERN char** getStoichiometryMatrixRowLabels(const char* moduleName);
773 
777 LIB_EXTERN char** getStoichiometryMatrixColumnLabels(const char* moduleName);
778 
782 LIB_EXTERN unsigned long getStoichiometryMatrixNumRows(const char* moduleName);
783 
787 LIB_EXTERN unsigned long getStoichiometryMatrixNumColumns(const char* moduleName);
788 
789 
793 LIB_EXTERN unsigned long getNumReactionRates(const char* moduleName);
794 
798 LIB_EXTERN char** getReactionRates(const char* moduleName);
799 
803 LIB_EXTERN char* getNthReactionRate(const char* moduleName, unsigned long rxn);
804 
815 LIB_EXTERN unsigned long getNumEvents(const char* moduleName);
816 
820 LIB_EXTERN char** getEventNames(const char* moduleName);
821 
825 LIB_EXTERN char* getNthEventName(const char* moduleName, unsigned long event);
826 
830 LIB_EXTERN unsigned long getNumAssignmentsForEvent(const char* moduleName, unsigned long event);
831 
835 LIB_EXTERN char* getTriggerForEvent(const char* moduleName, unsigned long event);
836 
840 LIB_EXTERN char* getDelayForEvent(const char* moduleName, unsigned long event);
841 
845 LIB_EXTERN bool getEventHasDelay(const char* moduleName, unsigned long event);
846 
850 LIB_EXTERN char* getPriorityForEvent(const char* moduleName, unsigned long event);
851 
855 LIB_EXTERN bool getEventHasPriority(const char* moduleName, unsigned long event);
856 
860 LIB_EXTERN bool getPersistenceForEvent(const char* moduleName, unsigned long event);
861 
865 LIB_EXTERN bool getT0ForEvent(const char* moduleName, unsigned long event);
866 
870 LIB_EXTERN bool getFromTriggerForEvent(const char* moduleName, unsigned long event);
871 
875 LIB_EXTERN char* getNthAssignmentVariableForEvent(const char* moduleName, unsigned long event, unsigned long n);
876 
880 LIB_EXTERN char* getNthAssignmentEquationForEvent(const char* moduleName, unsigned long event, unsigned long n);
892 LIB_EXTERN unsigned long getNumDNAStrands(const char* moduleName);
893 
897 LIB_EXTERN unsigned long* getDNAStrandSizes(const char* moduleName);
898 
902 LIB_EXTERN unsigned long getSizeOfNthDNAStrand(const char* moduleName, unsigned long n);
903 
907 LIB_EXTERN char*** getDNAStrands(const char* moduleName);
908 
912 LIB_EXTERN char** getNthDNAStrand(const char* moduleName, unsigned long n);
913 
917 LIB_EXTERN bool getIsNthDNAStrandOpen(const char* moduleName, unsigned long n, bool upstream);
918 
922 LIB_EXTERN unsigned long getNumModularDNAStrands(const char* moduleName);
923 
927 LIB_EXTERN unsigned long* getModularDNAStrandSizes(const char* moduleName);
928 
932 LIB_EXTERN char*** getModularDNAStrands(const char* moduleName);
933 
937 LIB_EXTERN char** getNthModularDNAStrand(const char* moduleName, unsigned long n);
938 
942 LIB_EXTERN bool getIsNthModularDNAStrandOpen(const char* moduleName, unsigned long n, bool upstream);
943 
957 LIB_EXTERN void freeAll();
958 
972 LIB_EXTERN bool addDefaultInitialValues(const char* moduleName);
973 
978 LIB_EXTERN void setBareNumbersAreDimensionless(bool dimensionless);
979 
983 END_C_DECLS
984 
985 #endif //ANTIMONY_API_H
LIB_EXTERN char ** getNthModularDNAStrand(const char *moduleName, unsigned long n)
Returns an array of names of the components in the nth modular DNA strand in the given module...
LIB_EXTERN char * getWarnings()
When translating some other format to Antimony, elements that are unable to be translated are saved a...
LIB_EXTERN unsigned long getNumReactions(const char *moduleName)
Returns the number of reactions (including genes) in the named module.
LIB_EXTERN char * getNthSymbolDisplayNameOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the 'display name' of the Nth symbol of the given type.
LIB_EXTERN char * getNthInteractionMthInteractorName(const char *modulename, unsigned long interaction, unsigned long interactor)
Returns the Mth interactor names for the given interaction.
LIB_EXTERN long loadAntimonyString(const char *model)
Loads a string and parses it as an Antimony set of modules.
LIB_EXTERN char * getSBMLString(const char *moduleName)
Returns the same output as writeSBMLFile, but to a char* array instead of to a file.
LIB_EXTERN char ** getNthReactionProductNames(const char *modulename, unsigned long rxn)
Returns an array of all the product names for the given reaction.
LIB_EXTERN rd_type * getInteractionDividers(const char *moduleName)
Returns an array of all the interaction dividers in the given module.
LIB_EXTERN bool getEventHasPriority(const char *moduleName, unsigned long event)
Returns 'true' if the given event has a priority; 'false' otherwise.
LIB_EXTERN unsigned long getNumFiles()
Returns the number of files loaded into memory so far.
LIB_EXTERN char * getNthReplacementSymbolName(const char *moduleName, unsigned long n)
Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given...
LIB_EXTERN unsigned long getStoichiometryMatrixNumRows(const char *moduleName)
The number of rows in the stoichiometry matrix (or, the number of 'varSpecies').
LIB_EXTERN char * getMainModuleName()
Returns the 'main' module name.
LIB_EXTERN char ** getSymbolNamesOfType(const char *moduleName, return_type rtype)
Returns the names of the symbols of the given return type.
LIB_EXTERN int writeSBMLFile(const char *filename, const char *moduleName)
Writes out a SBML-formatted XML file to the file indicated.
LIB_EXTERN long loadSBMLFile(const char *filename)
Load a file known to be SBML.
LIB_EXTERN unsigned long getSizeOfNthDNAStrand(const char *moduleName, unsigned long n)
Returns just the size (in number of components) of the nth DNA strand in the given module...
LIB_EXTERN void setBareNumbersAreDimensionless(bool dimensionless)
Sets whether bare numbers are dimensionless or undefined.
LIB_EXTERN char * getNthFormerSymbolNameBetween(const char *moduleName, const char *formerSubmodName, const char *replacementSubmodName, unsigned long n)
Returns the Nth symbol name that has been replaced by a new symbol name in the given module...
LIB_EXTERN long loadSBMLString(const char *model)
Load a string known to be SBML.
LIB_EXTERN long loadFile(const char *filename)
Load a file of any format libAntimony knows about (potentially Antimony, SBML, or CellML)...
LIB_EXTERN char * getCompSBMLString(const char *moduleName)
Returns the same output as writeSBMLFile, but to a char* array instead of to a file, using the 'Hierarchichal Model Composition' package.
LIB_EXTERN char ** getNthReplacementSymbolPairBetween(const char *moduleName, const char *formerSubmodName, const char *replacementSubmodName, unsigned long n)
Returns the Nth pair of symbol names that have been synchronized with each other–the first the symbol...
LIB_EXTERN char * getAntimonyString(const char *moduleName)
Returns the same output as writeAntimonyFile, but to a char* array instead of to a file...
LIB_EXTERN double ** getStoichiometryMatrix(const char *moduleName)
Returns an N x M stoichiometry matrix where N is the number of reactions in the model, and M is the number of variable species (or 'floating species').
LIB_EXTERN double * getNthReactionProductStoichiometries(const char *moduleName, unsigned long rxn)
Returns an array of the stoichiometries for the products of the Nth reaction in the module...
LIB_EXTERN unsigned long getNumEvents(const char *moduleName)
Returns the number of events in the given module.
LIB_EXTERN bool getIsNthDNAStrandOpen(const char *moduleName, unsigned long n, bool upstream)
Returns whether the given DNA strand was defined to be 'open' (that is, have an attachable end) at th...
LIB_EXTERN char ** getModuleNames()
Returns an array of all the current module names.
LIB_EXTERN unsigned long getNumDNAStrands(const char *moduleName)
Returns the number of unique DNA strands in the module, as defined in the Antimony documentation (or...
LIB_EXTERN long loadSBMLStringWithLocation(const char *model, const char *location)
Load a string known to be SBML with its file location.
LIB_EXTERN double * getNthReactionReactantStoichiometries(const char *moduleName, unsigned long rxn)
Returns an array of the stoichiometries for the reactants of the Nth reaction in the module...
LIB_EXTERN char * getLastError()
When any function returns an error condition, a longer description of the problem is stored in memory...
LIB_EXTERN unsigned long getNumModularDNAStrands(const char *moduleName)
Returns the sizes (in number of components) of all modular (separately-defined) DNA strands...
LIB_EXTERN char ** getNthInteractionInteracteeNames(const char *modulename, unsigned long rxn)
Returns an array of all the interactee names for the given interaction.
LIB_EXTERN int writeCellMLFile(const char *filename, const char *moduleName)
Writes out a CellML-formatted XML file to the file indicated, retaining the same Antimony hierarchy u...
LIB_EXTERN char ** getNthReplacementSymbolPair(const char *moduleName, unsigned long n)
Returns the Nth pair of symbol names that have been synchronized with each other–the first the symbol...
LIB_EXTERN long loadString(const char *model)
Load a string of any format libAntimony knows about (potentially Antimony, SBML, or CellML)...
LIB_EXTERN char *** getInteractorNames(const char *moduleName)
Returns all the interactor names for all interactions in the given module.
LIB_EXTERN char ** getNthInteractionInteractorNames(const char *modulename, unsigned long rxn)
Returns an array of all the interactor names for the given interaction.
LIB_EXTERN return_type getTypeOfSymbol(const char *moduleName, const char *symbolName)
Returns the most specific return type available for the given symbolName.
LIB_EXTERN char ** getSymbolDisplayNamesOfType(const char *moduleName, return_type rtype)
Returns the 'display names' of the symbols of the given return type.
LIB_EXTERN char ** getSymbolNamesInInterfaceOf(const char *moduleName)
Returns the names of the symbols defined to be in the interface of the given module.
LIB_EXTERN char ** getEventNames(const char *moduleName)
Returns the names of the events in the module.
LIB_EXTERN char * getNthSymbolNameInInterfaceOf(const char *moduleName, unsigned long n)
Returns the Nth symbol name defined to be in the interface of the given module.
LIB_EXTERN formula_type getTypeOfEquationForSymbol(const char *moduleName, const char *symbolName)
Returns the type of the 'main' equation associated with the given symbolName.
LIB_EXTERN bool getIsNthModularDNAStrandOpen(const char *moduleName, unsigned long n, bool upstream)
Returns whether the given modular DNA strand was defined to be 'open' (that is, have an attachable en...
LIB_EXTERN char * getNthEventName(const char *moduleName, unsigned long event)
Returns the name of the nth event in the module.
LIB_EXTERN bool checkModule(const char *moduleName)
Returns 'true' if the submitted module name exists in the current active set, 'false' if not...
LIB_EXTERN double ** getReactantStoichiometries(const char *moduleName)
Returns a two-dimensional array of the stoichiometries for all reactants in all reactions in the give...
LIB_EXTERN char ** getReactionRates(const char *moduleName)
Returns an array of the reaction rates for the given module.
LIB_EXTERN char ** getSymbolRateRulesOfType(const char *moduleName, return_type rtype)
Returns the equations associated with the rate rule for symbols of the given return type...
LIB_EXTERN char * getNthReactionRate(const char *moduleName, unsigned long rxn)
Returns the reaction rate for the Nth reaction in the module.
LIB_EXTERN unsigned long getStoichiometryMatrixNumColumns(const char *moduleName)
The number of columns in the stoichiometry matrix (or, the number of 'allReactions').
LIB_EXTERN unsigned long * getModularDNAStrandSizes(const char *moduleName)
Returns an array of Modular DNA strand sizes for the given module.
LIB_EXTERN char ** getNthDNAStrand(const char *moduleName, unsigned long n)
Returns an array of names of the components in the nth DNA strand in the given module.
return_type
return_types are used in the API when requesting information about different symbols.
Definition: enums.h:81
LIB_EXTERN char * getTriggerForEvent(const char *moduleName, unsigned long event)
Returns the trigger for the given event, as an equation that can be interpreted in a boolean context...
LIB_EXTERN char * getNthAssignmentEquationForEvent(const char *moduleName, unsigned long event, unsigned long n)
Each assignment for an event assigns a formula to a variable.
LIB_EXTERN long loadCellMLFile(const char *filename)
Load a file known to be CellML.
LIB_EXTERN char * getNthModuleName(unsigned long n)
Returns the nth module name.
LIB_EXTERN unsigned long getNumInteractions(const char *moduleName)
Returns the number of interactions in the named module.
LIB_EXTERN char * getNthReplacementSymbolNameBetween(const char *moduleName, const char *formerSubmodName, const char *replacementSubmodName, unsigned long n)
Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given...
LIB_EXTERN bool getFromTriggerForEvent(const char *moduleName, unsigned long event)
Returns the value of the 'fromTrigger' flag for the given event trigger (default is 'true')...
LIB_EXTERN char * getNthInteractionMthInteracteeName(const char *modulename, unsigned long interaction, unsigned long interactee)
Returns the Mth interactee name for the given interaction.
LIB_EXTERN char *** getAllReplacementSymbolPairs(const char *moduleName)
Returns a list of pairs of symbol names that have been synchronized with each other–the first the sym...
LIB_EXTERN bool getEventHasDelay(const char *moduleName, unsigned long event)
Returns 'true' if the given event has a delay; 'false' otherwise.
LIB_EXTERN char * getNthFormerSymbolName(const char *moduleName, unsigned long n)
Returns the Nth symbol name that has been replaced by a new symbol name in the given module...
LIB_EXTERN char * getNthReactionMthReactantName(const char *modulename, unsigned long rxn, unsigned long reactant)
Returns the mth reactant name of the mth reaction.
LIB_EXTERN char * getNthSymbolNameOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the name of the Nth symbol of the given type.
LIB_EXTERN char * getNthSymbolEquationOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the equation associated with the Nth symbol of the given type.
LIB_EXTERN char *** getDNAStrands(const char *moduleName)
Returns an array of all DNA strands in the given module as lists of their components.
formula_type
rule_type values are not used in the API, but are used internally in libAntimony. ...
Definition: enums.h:115
LIB_EXTERN unsigned long getNumSymbolsOfType(const char *moduleName, return_type rtype)
Returns the number of symbols of the given return type.
LIB_EXTERN bool getT0ForEvent(const char *moduleName, unsigned long event)
Returns the value at time 0 for the given event trigger (default is 'true').
LIB_EXTERN unsigned long getNumInteractees(const char *moduleName, unsigned long rxn)
Returns the number of interactees (reactions on the right side of the interaction) for the given inte...
LIB_EXTERN char * getSBMLWarnings(const char *moduleName)
Returns the 'warning' messages from libSBML.
LIB_EXTERN int writeAntimonyFile(const char *filename, const char *moduleName)
Writes out an antimony-formatted file containing the given module.
LIB_EXTERN int writeCompSBMLFile(const char *filename, const char *moduleName)
Writes out a SBML-formatted XML file to the file indicated, using the 'Hierarchichal Model Compositio...
LIB_EXTERN char ** getSymbolAssignmentRulesOfType(const char *moduleName, return_type rtype)
Returns the equations associated with the assignment rule for symbols of the given return type...
LIB_EXTERN unsigned long getNumProducts(const char *moduleName, unsigned long rxn)
Returns the number of products (species on the right side of the reaction) for the given reaction...
LIB_EXTERN bool addDefaultInitialValues(const char *moduleName)
Adds default initial values to the named module.
LIB_EXTERN char ** getStoichiometryMatrixRowLabels(const char *moduleName)
The row labels for the stoichiometry matrix.
LIB_EXTERN char ** getNthReactionReactantNames(const char *modulename, unsigned long rxn)
Returns an array of all the reactant names for the given reaction.
LIB_EXTERN void addDirectory(const char *directory)
Add a directory in which imported files may be found, and in which to look for a '.antimony' file (which contains rules about where to look locally for imported antimony and sbml files).
LIB_EXTERN char ** getSymbolInitialAssignmentsOfType(const char *moduleName, return_type rtype)
Returns the equations associated with the initial assignment for symbols of the given return type...
LIB_EXTERN char *** getProductNames(const char *moduleName)
Returns all the product names for all reactions in the given module.
LIB_EXTERN char * getNthSymbolCompartmentOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the name of the compartment associated with the nth symbol of the given type.
LIB_EXTERN char * getSBMLInfoMessages(const char *moduleName)
Returns the 'info' messages from libSBML.
LIB_EXTERN char ** getStoichiometryMatrixColumnLabels(const char *moduleName)
The column labels for the stoichiometry matrix.
LIB_EXTERN char *** getAllReplacementSymbolPairsBetween(const char *moduleName, const char *formerSubmodName, const char *replacementSubmodName, unsigned long n)
Returns a list of pairs of symbol names that have been synchronized with each other–the first the sym...
LIB_EXTERN char *** getReactantNames(const char *moduleName)
Returns all the reactant names for all reactions in the given module.
LIB_EXTERN char ** getSymbolEquationsOfType(const char *moduleName, return_type rtype)
Returns the equations associated with the symbols of the given return type.
LIB_EXTERN unsigned long getNumModules()
Returns the number of modules in the current active set (the last file successfully loaded...
Various enums used both in the API and internally in libAntimony.
LIB_EXTERN unsigned long getNumAssignmentsForEvent(const char *moduleName, unsigned long event)
Returns the number of assignments stored in the given event.
LIB_EXTERN char *** getInteracteeNames(const char *moduleName)
Returns all the interactee names for all interactions in the given module.
LIB_EXTERN char * getPriorityForEvent(const char *moduleName, unsigned long event)
Returns the priority for the given event, as an equation (if present; if the event has no priority...
LIB_EXTERN long loadAntimonyFile(const char *filename)
Loads a file and parses it as an Antimony file.
LIB_EXTERN char * getDelayForEvent(const char *moduleName, unsigned long event)
Returns the delay for the given event, as an equation (if present; if the event has no delay...
LIB_EXTERN double ** getProductStoichiometries(const char *moduleName)
Returns a two-dimensional array of the stoichiometries for all products in all reactions in the given...
LIB_EXTERN void freeAll()
Frees all pointers handed to you by libAntimony.
LIB_EXTERN unsigned long getNumSymbolsInInterfaceOf(const char *moduleName)
Returns the number of symbols defined to be in the interface of the given module. ...
LIB_EXTERN void clearDirectories()
Clears the list of directories added with the 'addDirectory' function.
LIB_EXTERN char *** getModularDNAStrands(const char *moduleName)
Returns an array of strands, each of which has an array of the names of the components of that strand...
LIB_EXTERN unsigned long getNumReplacedSymbolNames(const char *moduleName)
Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given...
LIB_EXTERN char * getCompartmentForSymbol(const char *moduleName, const char *symbolName)
Returns the name of the compartment the given symbol is a member of.
LIB_EXTERN unsigned long getNumReplacedSymbolNamesBetween(const char *moduleName, const char *formerSubmodName, const char *replacementSubmodName)
Returns the Nth replacement symbol name of a symbol that has replaced a different symbol in the given...
LIB_EXTERN unsigned long getNumReactants(const char *moduleName, unsigned long rxn)
Returns the number of reactants (species on the left side of the reaction) for the given reaction...
LIB_EXTERN unsigned long getNumReactionRates(const char *moduleName)
Returns the number of reactions (and hence reaction rates) in the module.
LIB_EXTERN char * getNthSymbolAssignmentRuleOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the assignment rule associated with the Nth symbol of the given type.
LIB_EXTERN bool getPersistenceForEvent(const char *moduleName, unsigned long event)
Returns the value of the persistence flag for the given event (default is 'false').
LIB_EXTERN unsigned long getNumInteractors(const char *moduleName, unsigned long rxn)
Returns the number of interactors (species on the left side of the interaction) for the given interac...
LIB_EXTERN double getNthReactionMthReactantStoichiometries(const char *moduleName, unsigned long rxn, unsigned long reactant)
Returns the stoichiometry for the Mth reactant of the Nth reaction in the module. ...
LIB_EXTERN char * getCellMLString(const char *moduleName)
Returns the same output as writeCellMLFile, but to a char* array instead of to a file.
LIB_EXTERN rd_type getNthInteractionDivider(const char *moduleName, unsigned long n)
Returns the Nth interaction divider in the module.
LIB_EXTERN char ** getSymbolCompartmentsOfType(const char *moduleName, return_type rtype)
Returns the compartments associated with the symbols of the given return type.
LIB_EXTERN unsigned long * getDNAStrandSizes(const char *moduleName)
Returns an array of DNA strand sizes for all strands in the module.
LIB_EXTERN char * getNthReactionMthProductName(const char *modulename, unsigned long rxn, unsigned long product)
Returns the mth product name of the given reaction.
LIB_EXTERN void printAllDataFor(const char *moduleName)
An example function that will print to stdout all the information in the given module.
LIB_EXTERN double getNthReactionMthProductStoichiometries(const char *moduleName, unsigned long rxn, unsigned long product)
Returns the stoichiometries for the Mth product of the Nth reaction in the module.
LIB_EXTERN char * getNthSymbolInitialAssignmentOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the initial assignment associated with the Nth symbol of the given type.
LIB_EXTERN char * getNthSymbolRateRuleOfType(const char *moduleName, return_type rtype, unsigned long n)
Returns the rate rule associated with the Nth symbol of the given type.
LIB_EXTERN char * getNthAssignmentVariableForEvent(const char *moduleName, unsigned long event, unsigned long n)
Each assignment for an event assigns a formula to a variable.
LIB_EXTERN long loadCellMLString(const char *model)
Load a string known to be CellML.
LIB_EXTERN void clearPreviousLoads()
Clears memory of all files loaded.
rd_type
rd_types are the different types of reactions and interactions.
Definition: enums.h:18
LIB_EXTERN bool revertTo(long index)
Change the 'active' set of modules to the ones from the given index (as received from 'load<file/strin...