enviPath_python

Contents

enviPath_python#

enviPath_python.enviPath module#

class enviPath_python.enviPath.enviPath(base_url, proxies=None, adapter=None, new_api=False)#

Bases: object

Object representing enviPath functionality.

create_package(group: Group | None = None, name: str | None = None, description: str | None = None) Package#

Function that creates an enviPath package

Parameters:
  • group (enviPath_python.objects.Group) – The group that the package will belong to

  • name (str) – The name for the package

  • description (str) – The description for the package

Returns:

The created package

Return type:

enviPath_python.objects.Package

get_base_url() str#

Method to return the base url of the enviPath object

Returns:

The base URL

Return type:

str

get_compound(compound_id) Compound#

Returns the compound matching with id compound_id

Parameters:

compound_id (str) – The identifier of the compound

Returns:

The retrieved compound with matching compound id

Return type:

enviPath_python.objects.Compound

get_compounds() List[Compound]#

Gets all compounds the logged in user has at least read permissions on.

Returns:

List of Compound objects.

Return type:

List

get_groups()#

Gets all groups the logged in user has at least read permissions on.

Returns:

List of Group objects.

Return type:

List

get_package(package_id: str) Package#

Gets the specified package

Parameters:

package_id (str) – The identifier of the package

Returns:

A package object

Return type:

enviPath_python.objects.Package

get_packages() List[Package]#

Gets all packages the logged in user has at least read permissions on.

Returns:

List of Package objects.

Return type:

List

get_pathway(pathway_id) Pathway#

Get the pathway with identifier pathway_id

Parameters:

pathway_id (str) – The identifier of the pathway

Returns:

The pathway with matching id

Return type:

enviPath_python.objects.Pathway

get_pathways() List[Pathway]#

Gets all pathways the logged in user has at least read permissions on.

Returns:

List of Pathway objects.

Return type:

List

get_reaction(reaction_id) Reaction#

Get the reaction with reaction identifier reaction_id

Parameters:

reaction_id (str) – The identifier for the reaction

Returns:

The reaction with matching id

Return type:

enviPath_python.objects.Reaction

get_reactions() List[Reaction]#

Gets all reactions the logged in user has at least read permissions on.

Returns:

List of Reaction objects.

Return type:

List

get_rule(rule_id) Rule#

Get the rule with identifier rule_id

Parameters:

rule_id (str) – The identifier of the rule

Returns:

The rule with the corresponding id equivalent to rule_id

Return type:

enviPath_python.objects.Rule

get_rules() List[Rule]#

Gets all rules the logged in user has at least read permissions on.

Returns:

List of Reaction objects.

Return type:

List

get_scenario(scenario_id) Scenario#

Get the pathway with identifier scenario_id

Parameters:

scenario_id (str) – The identifier of the scenario

Returns:

The scenario with matching id

Return type:

enviPath_python.objects.Scenario

get_scenarios() List[Scenario]#

Gets all scenarios the logged in user has at least read permissions on.

Returns:

List of Scenario objects.

Return type:

List

get_setting(setting_id) Setting#

Get the setting with identifier setting_id

Parameters:

setting_id (str) – The identifier of the setting

Returns:

The setting with matching id

Return type:

enviPath_python.objects.Setting

get_settings() List[Setting]#

Gets all settings the logged in user has at least read permissions on.

Returns:

List of Settings objects.

get_users() List[User]#

Gets all users the logged in user has at least read permissions on.

Returns:

List of Settings objects.

Return type:

List

login(username, password) None#

Performs login.

Parameters:
  • username (str) – The username.

  • password (str) – The corresponding password.

logout() None#

Performs logout.

Returns:

None

search(term: str, packages: Package | List[Package], method: str = 'defaultSmiles')#

Function designed to perform a search on an enviPath session.

Parameters:
  • term – the term with which the search wants to be performed

  • packages – the packages where the search wants to be performed

  • method – the method to be used from the list following [“text”, “inchikey”, “defaultSmiles”, “canonicalSmiles”, “exactSmiles”]

Returns:

a dictionary of object identifiers

who_am_i() User#

Method to get the currently logged in user.

Returns:

User object.

Return type:

enviPath_python.objects.User

class enviPath_python.enviPath.enviPathRequester(eP, proxies=None, adapter=None)#

Bases: object

Class performing all requests to the enviPath instance.

ENDPOINT_OBJECT_MAPPING = {Endpoint.COMPOUND: <class 'enviPath_python.objects.Compound'>, Endpoint.COMPOUNDSTRUCTURE: <class 'enviPath_python.objects.CompoundStructure'>, Endpoint.EDGE: <class 'enviPath_python.objects.Edge'>, Endpoint.GROUP: <class 'enviPath_python.objects.Group'>, Endpoint.NODE: <class 'enviPath_python.objects.Node'>, Endpoint.PACKAGE: <class 'enviPath_python.objects.Package'>, Endpoint.PARALLELCOMPOSITERULE: <class 'enviPath_python.objects.ParallelCompositeRule'>, Endpoint.PATHWAY: <class 'enviPath_python.objects.Pathway'>, Endpoint.REACTION: <class 'enviPath_python.objects.Reaction'>, Endpoint.RELATIVEREASONING: <class 'enviPath_python.objects.RelativeReasoning'>, Endpoint.RULE: <class 'enviPath_python.objects.Rule'>, Endpoint.SCENARIO: <class 'enviPath_python.objects.Scenario'>, Endpoint.SEQUENTIALCOMPOSITERULE: <class 'enviPath_python.objects.SequentialCompositeRule'>, Endpoint.SETTING: <class 'enviPath_python.objects.Setting'>, Endpoint.SIMPLERULE: <class 'enviPath_python.objects.SimpleRule'>, Endpoint.USER: <class 'enviPath_python.objects.User'>}#
delete_request(url, params=None, payload=None, **kwargs) Response#

Convenient method to perform DELETE request to given url with optional query parameters and data.

Parameters:
  • url (str) – The url for object deletion.

  • params (dict) – Dictionary containing query parameters as key, value.

  • payload – Data send within the body.

Returns:

response object.

Return type:

requests.Response

get_json(envipath_id: str) dict#

Returns the response of the request in a json format

Parameters:

envipath_id – The url where the get request wants to be performed

Returns:

The json version of the response

Return type:

json

get_object(obj_id, endpoint)#

Generic get method to retrieve objects.

Parameters:
  • obj_id (str) – The identifier for the object

  • endpoint – The endpoint where to get the object

Returns:

Object stored on the endpoint with id obj_id (if matched)

get_objects(base_url, endpoint)#

Generic get method to retrieve objects.

Parameters:
  • base_url (str) – The base URL

  • endpoint – Enum of Endpoint or a string identifying the endpoint.

Returns:

List of objects denoted by endpoint.

get_request(url, params=None, payload=None, **kwargs) Response#

Convenient method to perform GET request to given url with optional query parameters and data.

Parameters:
  • url (str) – The url to retrieve data from.

  • params (dict or None) – Dictionary containing query parameters as key, value.

  • payload – Data send within the body.

Returns:

response object.

Return type:

requests.Response

header = {'Accept': 'application/json'}#
login(url, username, password) None#

Performs login.

Parameters:
  • url (str) – Can be any valid enviPath url.

  • username (str) – The username.

  • password (str) – The corresponding password.

Returns:

None

logout(url) None#

Performs logout.

Parameters:

url (str) – Can be any valid enviPath url.

Returns:

None

post_request(url, params=None, payload=None, **kwargs) Response#

Convenient method to perform POST request to given url with optional query parameters and data.

Parameters:
  • url (str) – The url for object creation, object manipulation.

  • params (dict) – Dictionary containing query parameters as key, value.

  • payload – Data send within the body.

Returns:

response object.

Return type:

requests.Response

enviPath_python.objects module#

class enviPath_python.objects.AcidityAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an acidity additional information object.

This class represents additional information about acidity, including the low pH, high pH, and type of acidity.

allowed_values = ['', 'WATER', 'KCL', 'CACL2', 'CACL&#8322']#
get_acidityType()#

Retrieves the type of acidity.

Returns:

The type of acidity if set; otherwise, None.

Return type:

str

get_highPh()#

Retrieves the high pH value.

Returns:

The high pH value if set; otherwise, None.

Return type:

float

get_lowPh()#

Retrieves the low pH value.

Returns:

The low pH value if set; otherwise, None.

Return type:

float

mandatories = ['lowPh']#
name = 'acidity'#
classmethod parse(data_string)#

Parses a string containing acidity information to initialize an instance.

Parameters:

data_string (str) – A semicolon separated string in the format ‘lowPh - highPh;acidityType’

Returns:

An instance of AcidityAdditionalInformation populated with the parsed data.

Return type:

AcidityAdditionalInformation

set_acidityType(value)#

Sets the type of acidity.

Parameters:

value (str) – The type of acidity. Either ‘’,’WATER’, ‘KCL’, ‘CACL2’.

set_highPh(value)#

Sets the high pH value.

Parameters:

value (float) – The high pH value.

set_lowPh(value)#

Sets the low pH value.

Parameters:

value (float) – The low pH value.

class enviPath_python.objects.AcidityWaterSedimentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an acidity water-sediment additional information object.

This class represents additional information about acidity in water and sediment, including the pH values for water and sediment, as well as the type of acidity. It is made especially for water-sediment studies

allowed_values = ['', 'WATER', 'KCL', 'CACL2', 'CACL&#8322']#
get_acidityType()#

Retrieves the type of acidity.

Returns:

The type of acidity if set; otherwise, None.

Return type:

str

get_pH_sediment_high()#

Retrieves the high pH value for sediment.

Returns:

The high pH value for sediment if set; otherwise, None.

Return type:

float

get_pH_sediment_low()#

Retrieves the low pH value for sediment.

Returns:

The low pH value for sediment if set; otherwise, None.

Return type:

float

get_pH_water_high()#

Retrieves the high pH value for water.

Returns:

The high pH value for water if set; otherwise, None.

Return type:

float

get_pH_water_low()#

Retrieves the low pH value for water.

Returns:

The low pH value for water if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'acidity_ws'#
classmethod parse(data_string)#

Parses a string containing acidity information for water and sediment to initialize an instance.

Parameters:

data_string (str) – A semicolon-separated string in the form ‘pH_water_low - pH_water_high;pH_sediment_low - pH_sediment_high;acidityType’

Returns:

An instance of AcidityWaterSedimentAdditionalInformation populated with the parsed data.

Return type:

AcidityWaterSedimentAdditionalInformation

set_acidityType(value)#

Sets the type of acidity.

Parameters:

value (str) – The type of acidity. Possible values are ‘’, ‘WATER’, ‘KCL’, ‘CACL2’.

set_pH_sediment_high(value)#

Sets the high pH value for sediment.

Parameters:

value (float) – The high pH value for sediment.

set_pH_sediment_low(value)#

Sets the low pH value for sediment.

Parameters:

value (float) – The low pH value for sediment.

set_pH_water_high(value)#

Sets the high pH value for water.

Parameters:

value (float) – The high pH value for water.

set_pH_water_low(value)#

Sets the low pH value for water.

Parameters:

value (float) – The low pH value for water.

class enviPath_python.objects.AdditionalInformation(*args, **kwargs)#

Bases: ABC

static all_subclasses(cls)#
static get_subclass_by_name(name)#
get_unit()#
mandatories = []#
name = None#
validate()#
class enviPath_python.objects.AdditionalParametersMeasuredAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Parameters Measured additional information object.

This class represents additional information about measured parameters in a sample important for sludge data.

allowed_values = ['NH4+', 'NH4-', 'NH4-N', 'NO3-', 'NO2-', 'Ntot', 'PO43-', 'P-tot', 'DOC', 'none', 'NH&#8324&#8314', 'NH&#8324&#8315', 'NH&#8324-N', 'NO&#8323&#8315', 'NO&#8322&#8315', 'N&#8348&#8338&#8348', 'PO&#8324&#179&#8315', 'P&#8348&#8338&#8348']#
get_addparametersmeasured()#

Gets the measured parameter.

Returns:

The measured parameter, or None if not set.

Return type:

str or None

mandatories = []#
name = 'addparametersmeasured'#
classmethod parse(data_string)#

Parses the data_string to create a ParametersMeasuredAdditionalInformation instance.

Parameters:

data_string (str) – A string containing the measured parameter data.

Returns:

ParametersMeasuredAdditionalInformation instance.

Return type:

ParametersMeasuredAdditionalInformation

set_addparametersmeasured(value)#

Sets the measured parameter.

Parameters:

value (str) – The parameter measured in the sample.

class enviPath_python.objects.AerationTypeAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an Aeration Type additional information object.

This class represents additional information about the type of aeration used in sludge data.

allowed_types = ['stirring', 'shaking', 'bubbling air', 'bubbling air and stirring', 'other']#
get_aerationtype()#

Retrieves the type of aeration.

Returns:

The type of aeration if set; otherwise, None.

Return type:

str

mandatories = ['aerationtype']#
name = 'aerationtype'#
classmethod parse(data_string)#

Parses a string containing the type of aeration to initialize an instance.

Parameters:

data_string (str) – A string in the form of ‘aerationtype’.

Returns:

An instance of AerationTypeAdditionalInformation populated with the parsed data.

Return type:

AerationTypeAdditionalInformation

set_aerationtype(value)#

Sets the type of aeration.

Parameters:

value (str) – The type of aeration. Must be one of the following “stirring”, “shaking”, “bubbling air”, “bubbling air and stiring”, “other” otherwise it could cause an error.

class enviPath_python.objects.AmmoniaUptakeRateAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an AmmoniaUptakeRateAdditionalInformation object.

This class represents additional information about the ammonia uptake rate, including the start and end values. Either start and/or end value must be defined.

get_amionauptakerateEnd()#

Retrieves the end value for ammonia uptake rate.

Returns:

The end value for ammonia uptake rate if set; otherwise, None.

Return type:

float

get_amionauptakerateStart()#

Retrieves the start value for ammonia uptake rate.

Returns:

The start value for ammonia uptake rate if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'amionauptakerate'#
classmethod parse(data_string)#

Parses a string containing ammonia uptake rate information to initialize an instance.

Parameters:

data_string (str) – A semicolon-separated string in the form of ‘amionauptakerateStart;amionauptakerateEnd’ either start and/or end value must be defined.

Returns:

An instance of AmmoniaUptakeRateAdditionalInformation populated with the parsed data.

Return type:

AmmoniaUptakeRateAdditionalInformation

set_amionauptakerateEnd(value)#

Sets the end value for ammonia uptake rate.

Parameters:

value (float) – The end value for ammonia uptake rate.

set_amionauptakerateStart(value)#

Sets the start value for ammonia uptake rate.

Parameters:

value (float) – The start value for ammonia uptake rate.

class enviPath_python.objects.BioMassAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a biomass additional information object. This class is used to store and manage information about the microbial biomass measured at the start and end.

get_biomassEnd()#

Retrieves the ending microbial biomass.

Returns:

The ending microbial biomass if set; otherwise, None.

Return type:

str or None

get_biomassStart()#

Retrieves the starting microbial biomass.

Returns:

The starting microbial biomass if set; otherwise, None.

mandatories = ['biomassStart', 'biomassEnd']#
name = 'biomass'#
classmethod parse(data_string)#

Parses a string to initialize a BioMassAdditionalInformation instance.

Parameters:

data_string – A string in the format ‘biomassStart - biomassEnd’.

Returns:

An instance of BioMassAdditionalInformation with the specified start and end biomass values.

set_biomassEnd(value)#

Sets the ending microbial biomass.

Parameters:

value – A numeric value representing the ending microbial biomass, measured in μg C/g soil

set_biomassStart(value)#

Sets the starting microbial biomass.

Parameters:

value – A numeric value representing the starting microbial biomass, measured in μg C/g soil

class enviPath_python.objects.BioMassWaterSedimentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a biomass water-sediment additional information object.

This class represents additional information about the microbial biomass in water and sediment. It is made especially for water-sediment studies and one can choose ‘cells/g’ or ‘mg C/g’ as measurement units for the sediment

get_end_sediment_cells()#

Retrieves the ending cell count for microbial biomass in sediment.

Returns:

The ending cell count for microbial biomass in sediment if set; otherwise, None.

Return type:

int

get_end_sediment_mg()#

Retrieves the ending microbial biomass mass in sediment.

Returns:

The ending microbial biomass mass in sediment if set; otherwise, None.

Return type:

float

get_end_water_cells()#

Retrieves the ending cell count for microbial biomass in water.

Returns:

The ending cell count for microbial biomass in water if set; otherwise, None.

Return type:

int

get_start_sediment_cells()#

Retrieves the starting cell count for microbial biomass in sediment.

Returns:

The starting cell count for microbial biomass in sediment if set; otherwise, None.

Return type:

int

get_start_sediment_mg()#

Retrieves the starting microbial biomass mass in sediment.

Returns:

The starting microbial biomass mass in sediment if set; otherwise, None.

Return type:

float

get_start_water_cells()#

Retrieves the starting cell count for microbial biomass in water.

Returns:

The starting cell count for microbial biomass in water if set; otherwise, None.

Return type:

int

mandatories = []#
name = 'biomass_ws'#
classmethod parse(data_string)#

Parses a string containing biomass information for water and sediment to initialize an instance.

Parameters:

data_string (str) – A semicolon-separated string in the Format ‘start_water_cells - end_water_cells;start_sediment_cells - end_sediment_cells;start_sediment_mg - end_sediment_mg’

Returns:

An instance of BioMassWaterSedimentAdditionalInformation populated with the parsed data.

Return type:

BioMassWaterSedimentAdditionalInformation

set_end_sediment_cells(value)#

Sets the ending cell count for microbial biomass in sediment.

Parameters:

value (int) – The ending cell count for microbial biomass in sediment, measured in cells/g.

set_end_sediment_mg(value)#

Sets the ending microbial biomass mass in sediment when weight is given.

Parameters:

value (float) – The ending microbial biomass mass in sediment, measured in mg C/g.

set_end_water_cells(value)#

Sets the ending cell count for microbial biomass in water.

Parameters:

value (int) – The ending cell count for microbial biomass in water, measured in cells/mL

set_start_sediment_cells(value)#

Sets the starting cell count for microbial biomass in sediment.

Parameters:

value (int) – The starting cell count for microbial biomass in sediment, measured in cells/g.

set_start_sediment_mg(value)#

Sets the starting microbial biomass mass in sediment when weight is given.

Parameters:

value (float) – The starting microbial biomass mass in sediment, measured in mg C/g.

set_start_water_cells(value)#

Sets the starting cell count for microbial biomass in water.

Parameters:

value (int) – The starting cell count for microbial biomass in water, measured in cells/mL.

class enviPath_python.objects.BiologicalTreatmentTechnologyAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a biological treatment technology additional information object.

This class represents additional information about biological treatment technology.

allowed_values = ['nitrification', 'nitrification & denitrification', 'nitrification & denitrification & biological phosphorus removal', 'nitrification & denitrification & chemical phosphorus removal', 'other']#
get_biologicaltreatmenttechnology()#

Retrieves the biological treatment technology value.

Returns:

The biological treatment technology value if set; otherwise, None.

Return type:

str or None

mandatories = ['biologicaltreatmenttechnology']#
name = 'biologicaltreatmenttechnology'#
classmethod parse(data_string)#

Parses a string containing biological treatment technology information to initialize an instance.

Parameters:

data_string (str) – A string containing the biological treatment technology.

Returns:

An instance of BiologicalTreatmentTechnologyAdditionalInformation populated with the parsed data.

Return type:

BiologicalTreatmentTechnologyAdditionalInformation

set_biologicaltreatmenttechnology(value)#

Sets the biological treatment technology value.

Parameters:

value (str) – The biological treatment technology.

class enviPath_python.objects.BioreactorAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a bioreactor additional information object.

This class represents additional information about a bioreactor, including its type and size.

get_bioreactorsize()#

Retrieves the bioreactor size.

Returns:

The bioreactor size if set; otherwise, None.

Return type:

str or None

get_bioreactortype()#

Retrieves the bioreactor type.

Returns:

The bioreactor type if set; otherwise, None.

Return type:

str or None

mandatories = ['bioreactortype']#
name = 'bioreactor'#
classmethod parse(data_string)#

Parses a string containing bioreactor information to initialize an instance.

Parameters:

data_string (str) – A string in the format ‘bioreactortype;bioreactorsize’ or ‘bioreactortype, bioreactorsize’

Returns:

An instance of BioreactorAdditionalInformation populated with the parsed data.

Return type:

BioreactorAdditionalInformation

set_bioreactorsize(value)#

Sets the bioreactor size.

Parameters:

value (float) – The size of the bioreactor, measured in mL.

set_bioreactortype(value)#

Sets the bioreactor type.

Parameters:

value (str) – The type of the bioreactor.

class enviPath_python.objects.BulkDensityAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a bulk density additional information object.

This class represents additional information about bulk density.

get_bulkdensity()#

Retrieves the bulk density value.

Returns:

The bulk density value if set; otherwise, None.

Return type:

int

mandatories = ['bulkdensity']#
name = 'bulkdens'#
classmethod parse(data_string)#

Parses a string containing bulk density information to initialize an instance.

Parameters:

data_string (str) – A string representing the bulk density value.

Returns:

An instance of BulkDensityAdditionalInformation populated with the parsed data.

Return type:

BulkDensityAdditionalInformation

set_bulkdensity(value)#

Sets the bulk density value.

Parameters:

value (float) – The bulk density value, measured in g/cm3.

class enviPath_python.objects.CECAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a cation exchange capacity (CEC) additional information object.

This class represents additional information about cation exchange capacity.

get_cecdata()#

Retrieves the cation exchange capacity data.

Returns:

The cation exchange capacity data if set; otherwise, None.

Return type:

float

mandatories = ['cecdata']#
name = 'cec'#
classmethod parse(data_string)#

Parses a string containing cation exchange capacity data to initialize an instance.

Parameters:

data_string (str) – A string representing the cation exchange capacity data.

Returns:

An instance of CECAdditionalInformation populated with the parsed data.

Return type:

CECAdditionalInformation

set_cecdata(value)#

Sets the cation exchange capacity data.

Parameters:

value (float) – The cation exchange capacity data, measured in mEq/100g.

class enviPath_python.objects.ColumnHeightAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a column height additional information object.

This class represents additional information about column height.

get_column_height_sediment()#

Retrieves the column height in sediment.

Returns:

The column height in sediment if set; otherwise, None.

Return type:

float

get_column_height_water()#

Retrieves the column height in water.

Returns:

The column height in water if set; otherwise, None.

Return type:

float

mandatories = ['column_height_water', 'column_height_sediment']#
name = 'columnheight'#
classmethod parse(data_string)#

Parses a string containing column height information to initialize an instance.

Parameters:

data_string (str) – A semicolon-separated string in the format ‘column_height_sediment;column_height_water’

Returns:

An instance of ColumnHeightAdditionalInformation populated with the parsed data.

Return type:

ColumnHeightAdditionalInformation

set_column_height_sediment(value)#

Sets the column height in sediment.

Parameters:

value (float) – The column height in sediment, measured in cm.

set_column_height_water(value)#

Sets the column height in water.

Parameters:

value (float) – The column height in water, measured in cm.

class enviPath_python.objects.Compound(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class that implements the Compound enviPath object

add_structure(smiles, name=None, description=None, inchi=None, mol_file=None) CompoundStructure#
copy(package: ~enviPath_python.objects.Package, debug=False) -> (<class 'dict'>, 'Compound', typing.List[ForwardRef('CompoundStructure')])#

Copies the Compound object

Parameters:
  • package – package to which the new object will belong to

  • debug – whether to have more verbosity (True) or not (False)

Returns:

a dictionary mapping the ids of the parent and copied object, a Compound object that is a copy of the parent one, and a List of all the CompoundStructure objects associated with the original Compound

static create(parent: Package, smiles: str, name=None, description=None, inchi=None) Compound#

Creates a Compound enviPath object

Parameters:
  • parent – the Package to which the Compound will belong to

  • smiles – the SMILES of the Compound

  • name – the name of the Compound

  • description – the description of the Compound

  • inchi – the InChI of the Compound

Returns:

An enviPath Compound object

get_canonical_smiles() str#

Returns the canonical SMILES of the Compound

Returns:

canonical SMILES of the Compound

get_default_structure() CompoundStructure#

Return its CompoundStructure if available

Returns:

A CompoundStructure enviPath object

get_external_references() dict#

Retrieves the links to external sources of similar compounds

Returns:

A dictionary of links with keys being an identifier for the database

get_inchi() str#

Return the InChI of the Compound

Returns:

InChI of the Compound

get_inchikey() str#

Returns the InChIKey of the Compound

Returns:

InChIKey of the Compound

get_pubchem_references() List[str]#

Retrieves the links to pubChem of similar compounds

Returns:

A list of links to PubChem Compounds

get_smiles() str#

Returns the SMILES of the Compound

Returns:

SMILES of the Compound

get_structures() List[CompoundStructure]#

Gets all structures of this compound.

Returns:

List of Structure objects.

class enviPath_python.objects.CompoundStructure(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class that implements the CompoundStructure enviPath object

add_alias(alias)#

Adds an alias to the CompoundStructure

Parameters:

alias – the alias to be added

Returns:

copy(package: Package, debug=False)#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

None

static create(parent: Compound, smiles, name=None, description=None, inchi=None, mol_file=None) CompoundStructure#

Creates a CompoundStructure enviPath object

Parameters:
  • parent – the Package to which the CompoundStructure will belong to

  • smiles – the SMILES of the CompoundStructure

  • name – the name of the CompoundStructure

  • description – the description of the CompoundStructure

  • inchi – the InChI of the CompoundStructure

  • mol_file – the molecule file of the CompoundStructure

Returns:

An enviPath CompoundStructure object

get_canonical_smiles() str#

Retrieves the canonical SMILES of the CompoundStructure. This canonicalization method is provided by cdk’s SmilesGenerator class using the unique flavour.

Returns:

The canonical SMILES of the CompoundStructure

get_charge() float#

Retrieves the charge of the CompoundStructure

Returns:

Charge of CompoundStructure

get_external_references() dict#

Retrieves the links to external sources of similar compounds

Returns:

A dictionary of links with keys being an identifier for the database

get_formula() str#

Retrieves the formula of the CompoundStructure

Returns:

Formula of CompoundStructure

get_halflifes(scenario_type: str | None = None) List[HalfLife]#

Retrieves the halflifes of the CompoundStructure

Parameters:

scenario_type – a strng indicating the type of scenario

Returns:

A list of HalfLife objects

get_inchi() str#

Retrieves the InChI of the CompoundStructure

Returns:

InChI of CompoundStructure

get_inchikey() str#

Retrieves the InChIKey of the CompoundStructure.

Returns:

The InChIKey of the CompoundStructure

get_mass() float#

Retrieves the mass of the CompoundStructure

Returns:

Mass of CompoundStructure

get_pathways() List[Pathway]#

Retrieves the pathways on which the CompoundStructure is involved

Returns:

List of Pathway objects

get_pubchem_references() List[str]#

Retrieves the links to pubChem of similar compounds

Returns:

A list of links to PubChem Compounds

get_reactions() List[Reaction]#

Retrieves the reactions on which the CompoundStructure is involved

Returns:

List of Reaction objects

get_scenarios() List[Scenario]#

Retrieves the scenarios on which the CompoundStructure is involved

Returns:

List of Scenario objects

get_smiles() str#

Retrieves the SMILES of the CompoundStructure

Returns:

SMILES of CompoundStructure

get_svg() str#

Retrieves the image of the CompoundStructure

Returns:

Image of CompoundStructure as text

is_default_structure() bool#

Checks this structure is a default structure or not

Returns:

boolean to whether CompoundStructure is a default one or not

class enviPath_python.objects.ConfidenceLevelAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Confidence Level additional information object.

This class represents additional information about the confidence level of the data.

allowed_values = ['1', '2', '3', '4']#
get_radioconfidence()#

Gets the confidence level.

Returns:

The confidence level, or None if not set.

Return type:

str or None

mandatories = ['radioconfidence']#
name = 'confidencelevel'#
classmethod parse(data_string)#

Parses the data_string to create a ConfidenceLevelAdditionalInformation instance.

Parameters:

data_string (str) – A string containing confidence level data.

Returns:

ConfidenceLevelAdditionalInformation instance.

Return type:

ConfidenceLevelAdditionalInformation

set_radioconfidence(value)#

Sets the confidence level. Either 1,2,3,4.

Parameters:

value (str) – The confidence level value.

class enviPath_python.objects.DissolvedOrganicCarbonAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a dissolved organic carbon (DOC) additional information object.

This class represents additional information about dissolved organic carbon (DOC).

get_dissolvedorganiccarbonEnd()#

Retrieves the ending value of dissolved organic carbon.

Returns:

The ending value of dissolved organic carbon if set; otherwise, None.

Return type:

float

get_dissolvedorganiccarbonStart()#

Retrieves the starting value of dissolved organic carbon.

Returns:

The starting value of dissolved organic carbon if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'dissolvedorganiccarbon'#
classmethod parse(data_string)#

Parses a string containing dissolved organic carbon information to initialize an instance.

Parameters:

data_string (str) – A semicolon-separated string in the format ‘dissolvedorganiccarbonStart;dissolvedorganiccarbonEnd’.

Returns:

An instance of DissolvedOrganicCarbonAdditionalInformation populated with the parsed data.

Return type:

DissolvedOrganicCarbonAdditionalInformation

set_dissolvedorganiccarbonEnd(value)#

Sets the ending value of dissolved organic carbon.

Parameters:

value (float) – The ending value of dissolved organic carbon, measured in mg C/L.

set_dissolvedorganiccarbonStart(value)#

Sets the starting value of dissolved organic carbon.

Parameters:

value (float) – The starting value of dissolved organic carbon, measured in mg C/L.

class enviPath_python.objects.DissolvedOxygenConcentrationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Dissolved Oxygen Concentration additional information object.

This class represents additional information about dissolved oxygen concentration, including the lower and upper limits.

get_DissolvedoxygenconcentrationHigh()#

Retrieves the upper limit for dissolved oxygen concentration.

Returns:

The upper limit of dissolved oxygen concentration if set; otherwise, None.

Return type:

float

get_DissolvedoxygenconcentrationLow()#

Retrieves the lower limit for dissolved oxygen concentration.

Returns:

The lower limit of dissolved oxygen concentration if set; otherwise, None.

Return type:

float

mandatories = ['DissolvedoxygenconcentrationLow', 'DissolvedoxygenconcentrationHigh']#
name = 'Dissolvedoxygenconcentration'#
classmethod parse(data_string)#

Parses a string containing the low and high limits for dissolved oxygen concentration and returns the additional information object.

Parameters:

data_string (str) – A semicolon separated string in the format ‘DissolvedoxygenconcentrationLow;DissolvedoxygenconcentrationHigh’

Returns:

An instance of DissolvedOxygenConcentrationAdditionalInformation populated with the parsed data.

Return type:

DissolvedOxygenConcentrationAdditionalInformation

set_DissolvedoxygenconcentrationHigh(value)#

Sets the upper limit for dissolved oxygen concentration.

Parameters:

value (float) – The upper limit of dissolved oxygen concentration, measured in mg/L.

set_DissolvedoxygenconcentrationLow(value)#

Sets the lower limit for dissolved oxygen concentration.

Parameters:

value (float) – The lower limit of dissolved oxygen concentration, measured in mg/L.

class enviPath_python.objects.DummyAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

classmethod parse(data_string)#
validate()#
class enviPath_python.objects.ECNumber(ec_number: str, ec_name: str, pathways: List[Pathway])#

Bases: object

class enviPath_python.objects.Edge(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class the implements an Edge enviPath object

copy(package: Package, debug=False)#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

None

static create(pathway: Pathway, smirks: str | None = None, educts: List[Node] | None = None, products: List[Node] | None = None, multistep: bool = False, description: str | None = None)#

Create an Edge enviPath object

Parameters:
  • pathway – the Pathway object on which the Edge wants to be created

  • smirks – the SMIRKS of the Edge

  • educts – a list of Node objects where the Edge starts

  • products – a list of Node objects where the Edge ends

  • multistep – whether the Edge is a part of a multistep Reaction

  • description – the description of the Edge

Returns:

An Edge enviPath object

get_ec_numbers() List[ECNumber]#

Returns the EC Numbers associated with the given Edge object

Returns:

A List of ECNumber objects

get_end_nodes() List[Node]#

Retrieves the end Node object of the Edge

Returns:

A List of Node objects

get_reaction() Reaction#

Retrieves the Reaction object associated with this Edge

Returns:

A Reaction enviPath object

get_reaction_name() str#

Retrieves the name of the Reaction object associated with this Edge

Returns:

The name of the Reaction object

get_rule() Rule | None#

Retrieves the Rule associated with the Edge

Returns:

A Rule enviPath object

get_start_nodes() List[Node]#

Retrieves the starting Node object of the Edge

Returns:

A List of Node objects

class enviPath_python.objects.EnzymeAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an Enzyme additional information object.

This class represents additional information about enzymes.

get_enzymeECNumber()#

Gets the enzyme EC number.

Returns:

The EC number of the enzyme, or None if not set.

Return type:

str or None

get_enzymeName()#

Gets the enzyme name.

Returns:

The name of the enzyme, or None if not set.

Return type:

str or None

mandatories = ['enzymeName', 'enzymeECNumber']#
name = 'enzyme'#
classmethod parse(data_string)#

Parses the data_string to create an EnzymeAdditionalInformation instance.

Parameters:

data_string (str) – A string in the format ‘enzymeName (enzymeECNumber)’.

Returns:

EnzymeAdditionalInformation instance.

Return type:

EnzymeAdditionalInformation

set_enzymeECNumber(value)#

Sets the enzyme EC number.

Parameters:

value (str) – The EC number of the enzyme.

set_enzymeName(value)#

Sets the enzyme name.

Parameters:

value (str) – The name of the enzyme.

class enviPath_python.objects.FinalCompoundConcentrationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a final compound concentration additional information object.

This class represents additional information about the final compound concentration.

get_finalcompoundconcentration()#

Retrieves the final compound concentration value.

Returns:

The final compound concentration value if set; otherwise, None.

Return type:

float

mandatories = ['finalcompoundconcentration']#
name = 'finalcompoundconcentration'#
classmethod parse(data_string)#

Parses a string containing final compound concentration information to initialize an instance.

Parameters:

data_string (str) – A string representing the final compound concentration value.

Returns:

An instance of FinalCompoundConcentrationAdditionalInformation populated with the parsed data.

Return type:

FinalCompoundConcentrationAdditionalInformation

set_finalcompoundconcentration(value)#

Sets the final compound concentration value.

Parameters:

value (float) – The final compound concentration value, measured in μg/ L

Raises:

ValueError – If the provided value is not a float.

class enviPath_python.objects.Group(requester, *args, **kwargs)#

Bases: enviPathObject

create(**kwargs)#
class enviPath_python.objects.HalfLife(scenarioName, scenarioId, hl, hl_comment, hl_fit, hl_model, source)#

Bases: tuple

hl#

Alias for field number 2

hl_comment#

Alias for field number 3

hl_fit#

Alias for field number 4

hl_model#

Alias for field number 5

scenarioId#

Alias for field number 1

scenarioName#

Alias for field number 0

source#

Alias for field number 6

class enviPath_python.objects.HalfLifeAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a half-life additional information object.

This class represents additional information about the half-life of a compound.

allowed_values = ['', 'reported', 'self-calculated', 'neither']#
get_comment()#

Retrieves the comment for the half-life information.

Returns:

The comment for the half-life information if set; otherwise, None.

Return type:

str

get_firstOrder()#

Retrieves whether the half-life follows a first-order reaction.

Returns:

True if it’s a first-order reaction, False otherwise; None if not set.

Return type:

bool

get_fit()#

Retrieves the fit value of the half-life.

Returns:

The fit value of the half-life if set; otherwise, None.

Return type:

str

get_lower()#

Retrieves the lower bound of the half-life.

Returns:

The lower bound of the half-life if set; otherwise, None.

Return type:

float

get_source()#

Retrieves the source of the half-life information.

Returns:

The source of the half-life information if set; otherwise, None.

Return type:

str

get_upper()#

Retrieves the upper bound of the half-life.

Returns:

The upper bound of the half-life if set; otherwise, None.

Return type:

float

mandatories = ['lower', 'upper']#
name = 'halflife'#
classmethod parse(data_string)#

Parses a string containing half-life information to initialize an instance.

Parameters:

data_string (str) – A string containing half-life information in the format ‘model;fit;comment;lower - upper;source’

Returns:

An instance of HalfLifeAdditionalInformation populated with the parsed data.

Return type:

HalfLifeAdditionalInformation

set_comment(value)#

Sets a comment for the half-life information.

Parameters:

value (str) – A comment describing the half-life information.

set_firstOrder(value)#

Sets whether the half-life follows a first-order reaction.

Parameters:

value (bool) – True if it’s a first-order reaction, False otherwise.

set_fit(value)#

Sets the fit value of the half-life.

Parameters:

value (str) – The fit value of the half-life.

set_lower(value)#

Sets the lower bound of the half-life.

Parameters:

value (float) – The lower bound of the half-life, measured in days.

set_source(value)#

Sets the source of the half-life information.

Parameters:

value (str) – The source of the half-life information.

set_upper(value)#

Sets the upper bound of the half-life.

Parameters:

value (float) – The upper bound of the half-life, measured in days.

class enviPath_python.objects.HalfLifeWaterSedimentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a half-life water sediment additional information object.

This class represents additional information about the half-life of a compound in water and sediment environments.

allowed_values = ['', 'reported', 'self-calculated', 'neither']#
get_comment_ws()#

Retrieves the comment for the water and sediment half-life information.

Returns:

The comment for the water and sediment half-life information if set; otherwise, None.

Return type:

str

get_fit_ws()#

Retrieves the fit value for water and sediment.

Returns:

The fit value for water and sediment if set; otherwise, None.

Return type:

str

get_model_ws()#

Retrieves the model used for water and sediment half-life estimation.

Returns:

The model used for water and sediment half-life estimation if set; otherwise, None.

Return type:

str

get_sediment_high()#

Retrieves the sediment high half-life value.

Returns:

The sediment high half-life value if set; otherwise, None.

Return type:

float

get_sediment_low()#

Retrieves the sediment low half-life value.

Returns:

The sediment low half-life value if set; otherwise, None.

Return type:

float

get_source_ws()#

Retrieves the source of the water and sediment half-life information.

Returns:

The source of the water and sediment half-life information if set; otherwise, None.

Return type:

str

get_total_high()#

Retrieves the total high half-life value.

Returns:

The total high half-life value if set; otherwise, None.

Return type:

float

get_total_low()#

Retrieves the total low half-life value.

Returns:

The total low half-life value if set; otherwise, None.

Return type:

float

get_water_high()#

Retrieves the water high half-life value.

Returns:

The water high half-life value if set; otherwise, None.

Return type:

float

get_water_low()#

Retrieves the water low half-life value.

Returns:

The water low half-life value if set; otherwise, None.

Return type:

float

mandatories = ['total_low', 'total_high']#
name = 'halflife_ws'#
classmethod parse(data_string)#

Parses a string containing water and sediment half-life information to initialize an instance.

Parameters:

data_string (str) – A string containing water and sediment half-life information in the format ‘model;fit;comment;total_low - total_high;water_low - water_high;sediment_low - sediment_high;source’

Returns:

An instance of HalfLifeWaterSedimentAdditionalInformation populated with the parsed data.

Return type:

HalfLifeWaterSedimentAdditionalInformation

set_comment_ws(value)#

Sets a comment for the water and sediment half-life information.

Parameters:

value (str) – A comment describing the water and sediment half-life information.

set_fit_ws(value)#

Sets the fit value for water and sediment.

Parameters:

value (str) – The fit value for water and sediment, meaured in days.

set_model_ws(value)#

Sets the model used for water and sediment half-life estimation.

Parameters:

value (str) – The model used for water and sediment half-life estimation.

set_sediment_high(value)#

Sets the sediment high half-life value.

Parameters:

value (float) – The sediment high half-life value, meaured in days.

set_sediment_low(value)#

Sets the sediment low half-life value.

Parameters:

value (float) – The sediment low half-life value, meaured in days.

set_source_ws(value)#

Sets the source of the water and sediment half-life information. Allowed value are ‘reported’, ‘self-calculated’, ‘neither’.

Parameters:

value (str) – The source of the water and sediment half-life information.

set_total_high(value)#

Sets the total high half-life value.

Parameters:

value (float) – The total high half-life value, meaured in days.

set_total_low(value)#

Sets the total low half-life value.

Parameters:

value (float) – The total low half-life value, meaured in days.

set_water_high(value)#

Sets the water high half-life value.

Parameters:

value (float) – The water high half-life value, meaured in days.

set_water_low(value)#

Sets the water low half-life value.

Parameters:

value (float) – The water low half-life value, meaured in days.

class enviPath_python.objects.HumidityAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a humidity additional information object.

This class represents additional information about experimental humidity.

get_expHumid()#

Retrieves the experimental humidity value.

Returns:

The experimental humidity value if set; otherwise, None.

Return type:

float

get_humConditions()#

Retrieves the experimental humidity conditions.

Returns:

The experimental conditions value if set; otherwise, None.

Return type:

str

mandatories = ['expHumid']#
name = 'humidity'#
classmethod parse(data_string)#

Parses a string containing experimental humidity information to initialize an instance.

Parameters:

data_string (str) – A string representing the experimental humidity value.

Returns:

An instance of HumidityAdditionalInformation populated with the parsed data.

Return type:

HumidityAdditionalInformation

set_expHumid(value)#

Sets the experimental humidity value.

Parameters:

value (float) – The experimental humidity value, represented as a percentage.

set_humConditions(value)#

Sets the experimental humidity conditions.

Parameters:

value (str) – The value for experimental conditions.

class enviPath_python.objects.InitialMassSedimentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an initial mass sediment additional information object.

This class represents additional information about the initial mass of sediment.

allowed_values = ['WET', 'DRY']#
get_initial_mass_sediment()#

Retrieves the initial mass of sediment value.

Returns:

The initial mass of sediment if set; otherwise, None.

Return type:

float

get_wet_or_dry()#

Retrieves the wet or dry state of the sediment.

Returns:

The wet or dry state if set; otherwise, None.

Return type:

str

mandatories = ['initial_mass_sediment', 'wet_or_dry']#
name = 'initialmasssediment'#
classmethod parse(data_string)#

Parses a string containing initial mass sediment information to initialize an instance.

Parameters:

data_string (str) – A semi-colon separated string in the format ‘initial_mass_sediment;wet_or_dry’

Returns:

An instance of InitialMassSedimentAdditionalInformation populated with the parsed data.

Return type:

InitialMassSedimentAdditionalInformation

set_initial_mass_sediment(value)#

Sets the initial mass of sediment value.

Parameters:

value (float) – The initial mass of sediment, measured in g.

set_wet_or_dry(value)#

Sets the wet or dry state of the sediment.

Parameters:

value (str) – The state of the sediment (either ‘WET’ or ‘DRY’).

class enviPath_python.objects.InitialVolumeWaterAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an initial volume water additional information object.

This class represents additional information about the initial volume of water.

get_initialvolumewater()#

Retrieves the initial volume of water.

Returns:

The initial volume of water if set; otherwise, None.

Return type:

float or None

mandatories = ['initialvolumewater']#
name = 'initialvolumewater'#
classmethod parse(data_string)#

Parses a string containing initial volume water information to initialize an instance.

Parameters:

data_string (str) – A string representing the initial volume of water.

Returns:

An instance of InitialVolumeWaterAdditionalInformation populated with the parsed data.

Return type:

InitialVolumeWaterAdditionalInformation

Raises:

ValueError – If the provided value is not a float.

set_initialvolumewater(value)#

Sets the initial volume of water.

Parameters:

value (float) – The initial volume of water, measured in mL.

class enviPath_python.objects.InitiatingOrganismAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an Initiating Organism additional information object.

This class represents additional information about the initiating organism in a study.

get_organism()#

Gets the organism.

Returns:

The initiating organism, or None if not set.

Return type:

str or None

mandatories = []#
name = 'initorganism'#
classmethod parse(data_string)#

Parses the data_string to create an InitiatingOrganismAdditionalInformation instance.

Parameters:

data_string (str) – A string containing the initiating organism.

Returns:

InitiatingOrganismAdditionalInformation instance.

Return type:

InitiatingOrganismAdditionalInformation

set_organism(value)#

Sets the organism.

Parameters:

value (str) – The initiating organism.

class enviPath_python.objects.InoculumSourceAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an InoculumSourceAdditionalInformation object.

This class represents additional information about source of the inoculum.

get_inoculumsource()#

Gets the value for the inoculum source

Returns:

the value of the inoculum source

Return type:

str

mandatories = ['inoculumsource']#
name = 'inoculumsource'#
classmethod parse(data_string)#

Parses a string containing the source of the inoculum to initialize an instance.

Parameters:

data_string (str) – The source of the inoculum

set_inoculumsource(value)#

Sets the value for the inoculum source

Parameters:

value (str) – The source of the inoculum

class enviPath_python.objects.LagPhaseAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a lag phase additional information object.

This class represents additional information about the lag phase.

get_lagphase()#

Retrieves the lag phase value.

Returns:

The lag phase value if set; otherwise, None.

Return type:

float

mandatories = ['lagphase']#
name = 'lagphase'#
classmethod parse(data_string)#

Parses a string containing lag phase information to initialize an instance.

Parameters:

data_string (str) – A string representing the lag phase value.

Returns:

An instance of LagPhaseAdditionalInformation populated with the parsed data.

Return type:

LagPhaseAdditionalInformation

set_lagphase(value)#

Sets the lag phase value.

Parameters:

value (float) – The lag phase value, represented in minutes.

class enviPath_python.objects.LocationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a location additional information object.

This class represents additional information about the scenario location.

get_location()#

Retrieves the location value.

Returns:

The location value if set; otherwise, None.

Return type:

str

mandatories = ['location']#
name = 'location'#
classmethod parse(data_string)#

Parses a string containing location information to initialize an instance.

Parameters:

data_string (str) – A string representing the location value.

Returns:

An instance of LocationAdditionalInformation populated with the parsed data.

Return type:

LocationAdditionalInformation

set_location(value)#

Sets the location value.

Parameters:

value (str) – The location value.

class enviPath_python.objects.MinorMajorAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Object that implements the Transformation product importance

allowed_values = ['minor', 'major']#
get_radiomin()#

Gets the value of transformation product importance

Return type:

str

mandatories = ['radiomin']#
name = 'minormajor'#
classmethod parse(data_string)#

Parses the data_string to extract the value of radiomin

Parameters:

data_string (str) – the string containing the values of transformation product importance

Returns:

An instance of MinorMajorAdditionalInformation populated with the parsed data.

Return type:

MinorMajorAdditionalInformation

set_radiomin(value)#

Sets the value for the transformation product importance

Parameters:

value (str) – a text value similar to ‘minor’ or ‘major’

class enviPath_python.objects.ModelStatus(progress, status, statusMessage)#

Bases: tuple

progress#

Alias for field number 0

status#

Alias for field number 1

statusMessage#

Alias for field number 2

class enviPath_python.objects.NitrogenContentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a nitrogen content additional information object.

This class represents additional information about nitrogen content.

allowed_types = ['NH4MINUSN', 'NTOT', 'NH&#8324-N']#
get_nitrogencontentEffluent()#

Retrieves the nitrogen content in the effluent.

Returns:

The nitrogen content in the effluent if set; otherwise, None.

Return type:

float

get_nitrogencontentInfluent()#

Retrieves the nitrogen content in the influent.

Returns:

The nitrogen content in the influent if set; otherwise, None.

Return type:

float

get_nitrogencontentType()#

Retrieves the type of nitrogen content.

Returns:

The type of nitrogen content if set; otherwise, None.

Return type:

float

mandatories = ['nitrogencontentType']#
name = 'nitrogencontent'#
classmethod parse(data_string)#

Parses a string containing nitrogen content information to initialize an instance.

Parameters:

data_string (str) – A string in the format ‘nitrogencontentType;nitrogencontentInfluent;nitrogencontentEffluent’. Depends if both infleunt and effluent want to be passed.

Returns:

An instance of NitrogenContentAdditionalInformation populated with the parsed data.

Return type:

NitrogenContentAdditionalInformation

set_nitrogencontentEffluent(value)#

Sets the effluent nitrogen content.

Parameters:

value (float) – The nitrogen content in the effluent, measured in mg/L.

set_nitrogencontentInfluent(value)#

Sets the influent nitrogen content.

Parameters:

value (float) – The nitrogen content in the influent, measured in mg/L.

set_nitrogencontentType(value)#

Sets the type of nitrogen content.

Parameters:

value – The type of nitrogen content. The allowed value are ‘NH4MINUSN’,’NTOT’, ‘NH&#8324-N’

class enviPath_python.objects.Node(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class that implements the Node enviPath object

add_structure(structure: CompoundStructure, as_default=False)#

Adds a CompoundStructure to the list of structures for this node

Parameters:
  • structure – the CompoundStructure that wants to be added to the node

  • as_default – whether to use this CompoundStructure as default structure for the node

Returns:

copy(package: Package, debug=False)#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

None

static create(pathway: Pathway, smiles, name: str | None = None, description: str | None = None, depth: int | None = None) Node#

Creates a Node object within a pathway, returns the Node object. Similar to the Pathway.add_node() function, which does not return a Node object.

Parameters:
  • pathway – parent pathway

  • smiles – the SMILES associated with the corresponding Node

  • name – the name of the Node

  • description – the description of the Node

  • depth – the depth of the Node

Returns:

Node object

get_ad_assessment() ADAssessment | None#
get_confidence_scenarios() List[Scenario]#
get_default_structure() CompoundStructure#

Retrieves the default structure of the Compound contained in the Node

Returns:

The default CompoundStructure of the Compound contained in the Node object

get_depth() int#

Gets the depth of the Node

Returns:

Integer representing the depth of the Node within the Pathway

get_halflifes() List[HalfLife]#

Retrieves the half-lifes of the Compound contained in Node object

Returns:

List of HalfLife objects

get_proposed_values_scenarios() List[Scenario]#
get_smiles() str#

Retrieves the SMILES of the Compound associated with the Node object

Returns:

A string representing the SMILES of the Node’s Component object

get_structures() List[CompoundStructure]#

Gets the List of all CompoundStructure objects contained in the Node

Returns:

A List of CompoundStructure

get_svg() str#

Gets the image representation of the Compound in a string format

Returns:

A string that contains the image information of the Compound

class enviPath_python.objects.NormalizationRule(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

static create(setting: Setting, smirks: str, name: str | None = None, description: str | None = None)#
class enviPath_python.objects.NutrientsAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a nutrients additional information object.

This class represents additional information about the addition of nutrients.

get_additionofnutrients()#

Retrieves the information about the addition of nutrients.

Returns:

The information about the addition of nutrients if set; otherwise, None.

Return type:

str

mandatories = ['additionofnutrients']#
name = 'additionofnutrients'#
classmethod parse(data_string)#

Parses a string containing information about the addition of nutrients to initialize an instance.

Parameters:

data_string (str) – A string representing the information about the addition of nutrients.

Returns:

An instance of NutrientsAdditionalInformation populated with the parsed data.

Return type:

NutrientsAdditionalInformation

set_additionofnutrients(value)#

Sets the information about the addition of nutrients.

Parameters:

value (str) – The information about the addition of nutrients.

class enviPath_python.objects.OMContentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an organic matter (OM) content additional information object.

This class represents additional information about organic matter content.

get_omcontentINOC()#

Retrieves the OM content in OC.

Returns:

The OM content in OC if set; otherwise, None.

Return type:

float

get_omcontentInOM()#

Retrieves the OM content in OM.

Returns:

The OM content in OM if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'omcontent'#
classmethod parse(data_string)#

Parses a string containing OM content information to initialize an instance.

Parameters:

data_string (str) – A string in the format ‘value;OC’ or ‘value;OM’.

Returns:

An instance of OMContentAdditionalInformation populated with the parsed data.

Return type:

OMContentAdditionalInformation

set_omcontentINOC(value)#

Sets the organic matter content measured in organic carbon.

Parameters:

value (float) – The OM content, measured in organic carbon.

set_omcontentInOM(value)#

Sets the organic matter content measured in organic matter.

Parameters:

value (float) – The OM content measured in organic matter.

class enviPath_python.objects.OrganicCarbonWaterAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an organic carbon content additional information object.

Represents additional information about organic carbon in the water-layer of water-sediment studies such as TOC and DOC. Low (minimal) and high (maximal) values can be set. If only either low or high value is set, then both low and high are set to this value.

get_DOC_high()#

Retrieves the high value of dissolved organic carbon (DOC).

Returns:

The high value of DOC if set; otherwise, None.

Return type:

float

get_DOC_low()#

Retrieves the low value of dissolved organic carbon (DOC).

Returns:

The low value of DOC if set; otherwise, None.

Return type:

float

get_TOC_high()#

Retrieves the high value of total organic carbon (TOC).

Returns:

The high value of TOC if set; otherwise, None.

Return type:

float

get_TOC_low()#

Retrieves the low value of total organic carbon (TOC).

Returns:

The low value of TOC if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'organiccarbonwater'#
classmethod parse(data_string)#

Parses a string containing organic carbon information to initialize an instance.

Parameters:

data_string (str) – A string in the format e.g ‘TOC_low - TOC_low;NA’

Returns:

An instance of OrganicCarbonWaterAdditionalInformation populated with the parsed data.

Return type:

OrganicCarbonWaterAdditionalInformation

set_DOC_high(value)#

Sets the high value of dissolved organic carbon (DOC). Can be interpreted as maximal value.

Parameters:

value (float) – The high value of DOC, measured in mg/L.

set_DOC_low(value)#

Sets the low value of dissolved organic carbon (DOC). Can be interpreted as minimal value.

Parameters:

value (float) – The low value of DOC, measured in mg/L.

set_TOC_high(value)#

Sets the high value of total organic carbon (TOC). Can be interpreted as maximal value.

Parameters:

value (float) – The high value of TOC, measured in mg/L.

set_TOC_low(value)#

Sets the low value of total organic carbon (TOC). Can be interpreted as minimal value.

Parameters:

value (float) – The low value of TOC, measured in mg/L.

class enviPath_python.objects.OrganicContentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an organic content additional information object.

This class represents additional information about organic content in water-sediment studies such as organic matter (OM) and organic carbon (OC). Low (minimal) and high (maximal) values can be set. If only either low or high value is set, then both low and high are set to this value.

get_OC_content_high()#

Retrieves the high value of organic carbon (OC) content.

Returns:

The high value of OC content if set; otherwise, None.

Return type:

float

get_OC_content_low()#

Retrieves the low value of organic carbon (OC) content.

Returns:

The low value of OC content if set; otherwise, None.

Return type:

float

get_OM_content_high()#

Retrieves the high value of organic matter (OM) content.

Returns:

The high value of OM content if set; otherwise, None.

Return type:

float

get_OM_content_low()#

Retrieves the low value of organic matter (OM) content.

Returns:

The low value of OM content if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'organiccontent'#
classmethod parse(data_string)#

Parses a string containing organic content information to initialize an instance.

Parameters:

data_string (str) – A string in the format e.g ‘OC_content_low - OC_content_high;NA’ or ‘OC_content_low - OC_content_low;OM_content_low - OM_content_high’

Returns:

An instance of OrganicContentAdditionalInformation populated with the parsed data.

Return type:

OrganicContentAdditionalInformation

set_OC_content_high(value)#

Sets the high value of organic carbon (OC) content.

Parameters:

value (float) – The high value of OC content.

set_OC_content_low(value)#

Sets the low value of organic carbon (OC) content.

Parameters:

value (float) – The low value of OC content.

set_OM_content_high(value)#

Sets the high value of organic matter (OM) content.

Parameters:

value (float) – The high value of OM content.

set_OM_content_low(value)#

Sets the low value of organic matter (OM) content.

Parameters:

value (float) – The low value of OM content.

class enviPath_python.objects.OriginalSludgeAmountAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an additional information object for original sludge amount.

This class represents additional information about the initial amount of sludge.

get_originalsludgeamount()#

Retrieves the original sludge amount.

Returns:

The original sludge amount if set; otherwise, None.

Return type:

float

mandatories = ['originalsludgeamount']#
name = 'originalsludgeamount'#
classmethod parse(data_string)#

Parses a string containing original sludge amount information to initialize an instance.

Parameters:

data_string (str) – A string representing the original sludge amount.

Returns:

An instance of OriginalSludgeAmountAdditionalInformation populated with the parsed data.

Return type:

OriginalSludgeAmountAdditionalInformation

set_originalsludgeamount(value)#

Sets the original sludge amount.

Parameters:

value (float) – The original sludge amount, measured in mL.

class enviPath_python.objects.OxygenContentWaterSedimentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an additional information object for oxygen content in water and sediment.

This class represents additional information about the oxygen content in water and sediment. Low (minimal) and high (maximal) values can be set. If only either low or high value is set, then both low and high are set to this value.

get_oxygen_content_sediment_high()#

Retrieves the high oxygen content in sediment.

Returns:

The high oxygen content in sediment if set; otherwise, None.

Return type:

float

get_oxygen_content_sediment_low()#

Retrieves the low oxygen content in sediment.

Returns:

The low oxygen content in sediment if set; otherwise, None.

Return type:

float

get_oxygen_content_water_high()#

Retrieves the high oxygen content in water.

Returns:

The high oxygen content in water if set; otherwise, None.

Return type:

float

get_oxygen_content_water_low()#

Retrieves the low oxygen content in water.

Returns:

The low oxygen content in water if set; otherwise, None.

Return type:

float

mandatories = []#
name = 'oxygencontent'#
classmethod parse(data_string)#

Parses a string containing oxygen content information to initialize an instance.

Parameters:

data_string (str) – A string in the format ‘NA -

Returns:

An instance of OxygenContentWaterSedimentAdditionalInformation populated with the parsed data.

Return type:

OxygenContentWaterSedimentAdditionalInformation

set_oxygen_content_sediment_high(value)#

Sets the high oxygen content in sediment.

Parameters:

value (float) – The high oxygen content in sediment, given in percentage.

set_oxygen_content_sediment_low(value)#

Sets the low oxygen content in sediment.

Parameters:

value (float) – The low oxygen content in sediment, given in percentage.

set_oxygen_content_water_high(value)#

Sets the high oxygen content in water.

Parameters:

value (float) – The high oxygen content in water, measured in mg/L.

set_oxygen_content_water_low(value)#

Sets the low oxygen content in water.

Parameters:

value (float) – The low oxygen content in water, measured in mg/L.

class enviPath_python.objects.OxygenDemandAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates the oxygen demand additional information object.

This class represents additional information about oxygen demand, including the type, influent, and effluent values.

allowed_types = ['Chemical Oxygen Demand (COD)', 'Biological Oxygen Demand (BOD5)']#
get_oxygendemandEffluent()#

retrieves The effluent oxygen demand value

Returns:

The effluent oxygen demand value if set; otherwise, None

Return type:

float or None

get_oxygendemandInfluent()#

Retrieves the influent oxygen demand value

Returns:

The influent oxygen demand value if set; otherwise, None

Return type:

float or None

get_oxygendemandType()#

Retrieves the oxygen demand type

Returns:

The oxygen demand value of the influent if set; otherwise, None

Return type:

str

mandatories = ['oxygendemandType']#
name = 'oxygendemand'#
classmethod parse(data_string)#

Parses a semicolon-separated data_string and returns the instantiated additional information object.

Parameters:

data_string (str) – A semicolon separated string in the format ‘ oxygendemandType;oxygendemandInfluent;oxygendemandEffluent’

Returns:

The additional information object instantiated with the parsed data.

Return type:

OxygenDemandAdditionalInformation

set_oxygendemandEffluent(value)#

Sets the effluent oxygen demand, m

Parameters:

value (float) – The effluent value of the oxygen demand, measured in mg/L.

set_oxygendemandInfluent(value)#

Sets the influent oxygen demand.

Parameters:

value (float) – The influent value of the oxygen demand, measured in mg/L.

set_oxygendemandType(value)#

Sets the oxygen demand type.

Parameters:

value (str) – The value to set. Must be one of ‘’, ‘Chemical Oxygen Demand (COD)’, ‘Biological Oxygen Demand (BOD5)’.

class enviPath_python.objects.OxygenUptakeRateAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an Oxygen Uptake Rate additional information object.

This class represents additional information about oxygen uptake rate, including the start and end values.

get_oxygenuptakerateEnd()#

Retrieves the end value for the oxygen uptake rate.

Returns:

The end value of the oxygen uptake rate if set; otherwise, None.

Return type:

float or None

get_oxygenuptakerateStart()#

Retrieves the start value for the oxygen uptake rate.

Returns:

The start value of the oxygen uptake rate if set; otherwise, None.

Return type:

float or None

mandatories = ['oxygenuptakerateStart', 'oxygenuptakerateEnd']#
name = 'oxygenuptakerate'#
classmethod parse(data_string)#

Parses a string containing the start and end values for the oxygen uptake rate to initialize an instance.

Parameters:

data_string (str) – A semicolon separated string in the format ‘oxygenuptakerateStart;oxygenuptakerateEnd’

Returns:

An instance of OxygenUptakeRateAdditionalInformation populated with the parsed data.

Return type:

OxygenUptakeRateAdditionalInformation

set_oxygenuptakerateEnd(value)#

Sets the end value for the oxygen uptake rate.

Parameters:

value (float) – The end value of the oxygen uptake rate, measured in mg/L/hr.

set_oxygenuptakerateStart(value)#

Sets the start value for the oxygen uptake rate.

Parameters:

value (float) – The start value of the oxygen uptake rate, measured in mg/L/hr.

class enviPath_python.objects.PFASManufacturingCategoryAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a sample PFAS manufacturing category additional information object.

This class represents additional information about the PFAS manufacturing category.

allowed_types = ['Electrochemical Fluorination (ECF)', 'Fluorotelomerization (FT)', 'Other']#
get_pfasmanufacturingcategory()#

Retrieves the PFAS manufacturing category.

Returns:

The PFAS manufacturing category if set; otherwise, None.

Return type:

str or None

mandatories = ['pfasmanufacturingcategory']#
name = 'pfasmanufacturingcategory'#
classmethod parse(data_string)#

Parses a string containing the PFAS manufacturing category information to initialize an instance.

Parameters:

data_string (str) – A string representing the PFAS manufacturing category.

Returns:

An instance of PFASManufacturingCategoryAdditionalInformation populated with the parsed data.

Return type:

PFASManufacturingCategoryAdditionalInformation

set_pfasmanufacturingcategory(value)#

Sets the PFAS manufacturing category.

Parameters:

value (str) – The PFAS manufacturing category the allowed values are [‘ElectroFluorination’, ‘Fluorotelomerization’, ‘Other’].

class enviPath_python.objects.Package(requester, *args, **kwargs)#

Bases: enviPathObject

Class that implements a package envipath object

add_compound(smiles: str, name: str | None = None, description: str | None = None, inchi: str | None = None) Compound#

Adds the compound to the package

Parameters:
  • smiles – the SMILES of the compound

  • name – the name of the compound

  • description – the description of the compound

  • inchi – the InChI of the compound

Returns:

The enviPath Compound

Return type:

Compound

add_parallel_composite_rule(simple_rules: List[SimpleRule], name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None, immediate: str | None = None) ParallelCompositeRule#

Adds a ParallelCompositeRule to the package

Parameters:
  • simple_rules – A list of SimpleRule that compose the ParallelCompositeRule

  • name – The name of the rule

  • description – The description of the rule

  • reactant_filter_smarts – a filter for the reactant

  • product_filter_smarts – a filter for the product

  • immediate – the immediate of the ParallelCompositeRule

Returns:

The ParallelCompositeRule that has been defined

add_pathway(smiles: str, name: str | None = None, description: str | None = None, root_node_only: bool = False, setting: Setting | None = None) Pathway#

Adds a Pathway to the package

Parameters:
  • smiles – Smiles of root node compound

  • name – the name for the pathway

  • description – the description of the pathway

  • root_node_only – If False, goes to pathway prediction mode

  • setting – Setting for pathway prediction

Returns:

The Pathway that has been defined

add_reaction(smirks: str | None = None, educt: CompoundStructure | None = None, product: CompoundStructure | None = None, name: str | None = None, description: str | None = None, rule: Rule | None = None)#

Adds a Reaction to the package

Parameters:
  • smirks – The SMIRKS of the simple rule

  • educt – The CompoundStructure of the reactants

  • product – The CompoundStructure of the products

  • name – The name of the rule

  • description – The description of the Reaction

  • rule – The rule with which the reaction is associated with

Returns:

The Reaction that has been defined

add_relative_reasoning(packages: List[Package], classifier_type: ClassifierType, eval_type: EvaluationType, association_type: AssociationType, evaluation_packages: List[Package] | None = None, fingerprinter_type: FingerprinterType = FingerprinterType.ENVIPATH_FINGERPRINTER, quickbuild: bool = True, use_p_cut: bool = False, cut_off: float = 0.5, evaluate_later: bool = True, name: str | None = None) RelativeReasoning#

Create a relative reasoning object

Parameters:
  • package – The package object in which the model is created

  • packages – List of package objects on which the model is trained

  • classifier_type – Classifier options: Rule-Based : ClassifierType(“RULEBASED”) Machine Learning-Based (MLC-BMaD) : ClassifierType(“MLCBMAD”) Machine Learning-Based (ECC) : ClassifierType(“ECC”)

  • eval_type – Evaluation type: Single Generation : EvaluationType(“single”) Single + Multiple Generation : EvaluationType(“multigen”)

  • association_type – Association type: AssociationType(“DATABASED”) AssociationType(“CALCULATED”), default

  • evaluation_packages – List of package objects on which the model is evaluated. If none, the classifier is evaluated in a 100-fold holdout model using a 90/10 split ratio.

  • fingerprinter_type – Default: MACS Fingerprinter (“ENVIPATH_FINGERPRINTER”)

  • quickbuild – Faster evaluation, default: False

  • use_p_cut – Default: False

  • cut_off – The cutoff threshold used in the evaluation. Default: 0.5

  • evaluate_later – Only build the model, and not proceed to evaluation. Default: False

  • name – Name of the model

Returns:

RelativeReasoning object

add_sequential_composite_rule(simple_rules: List[SimpleRule], name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None, immediate: str | None = None) SequentialCompositeRule#

Adds a SequentialCompositeRule to the package

Parameters:
  • simple_rules – A list of SimpleRule that compose the SequentialCompositeRule

  • name – The name of the rule

  • description – The description of the rule

  • reactant_filter_smarts – a filter for the reactant

  • product_filter_smarts – a filter for the product

  • immediate – the immediate of the SequentialCompositeRule

Returns:

The SequentialCompositeRule that has been defined

add_simple_rule(smirks: str, name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None, immediate: str | None = None) SimpleRule#

Adds a SimpleRule to the package

Parameters:
  • smirks – The SMIRKS of the simple rule

  • name – The name of the rule

  • description – The description of the rule

  • reactant_filter_smarts – a filter for the reactant

  • product_filter_smarts – a filter for the product

  • immediate – the immediate of the SimpleRule

Returns:

The SimpleRule that has been defined

copy(target_package: Package, debug=False)#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

static create(ep, group: Group | None = None, name: str | None = None, description: str | None = None) Package#

Creates the package

Parameters:
  • ep – an enviPath object

  • group – the group to which assign the package

  • name – the name of the package

  • description – the description of the package

Returns:

An enviPath_python Package with an allocated identifier on the enviPath server

export_as_json() dict#

Exports the entire package as json.

Returns:

A dictionary containing all data stored in this package.

get_compounds() List[Compound]#

Gets all compounds of the package.

Returns:

List of Compound objects.

get_pathways() List[Pathway]#

Gets all pathways of the package.

Returns:

List of Pathway objects.

get_reactions() List[Reaction]#

Gets all reactions of the package.

Returns:

List of Reaction objects.

get_relative_reasonings() List[RelativeReasoning]#

Gets all relative reasonings of the packages.

Returns:

List of RelativeReasoning objects.

get_rules() List[Rule]#

Gets all rules of the package.

Returns:

List of Rule objects.

get_scenarios() List[Scenario]#

Gets all scenarios of the package.

Returns:

List of Scenario objects.

static merge_packages(target: Package, sources: List[Package], debug=False) None#

Merges a list of packages to the target Package

Parameters:
  • target – the Package where the merge wants to be performed

  • sources – a list of Package

  • debug – whether to add more verbosity or not to the method

Returns:

predict(smiles: str, name: str | None = None, description: str | None = None, root_node_only: bool = False, setting: Setting | None = None) Pathway#

Alias for add_pathway()

Parameters:
  • smiles – Smiles of root node compound

  • name – the name for the pathway

  • description – the description of the pathway

  • root_node_only – If False, goes to pathway prediction mode

  • setting – Setting for pathway prediction

Returns:

The Pathway that has been defined

search(term: str)#

Function designed to perform a search on an enviPath session on the given Package.

Parameters:

term – the term with which the search wants to be performed

Returns:

a dictionary of object identifiers

set_access_for_user(obj: Group | User, perm: Permission) None#

Gives perm permission to the list of user or groups obj

Parameters:
  • obj – a list of user or groups to give access to

  • perm – the permission to be given

Returns:

set_description(desc: str) None#

Sets the description of the package

Parameters:

desc (str) – the description of the package

Returns:

class enviPath_python.objects.ParallelCompositeRule(requester, *args, **kwargs)#

Bases: Rule

Class that implements a ParallelCompositeRule enviPath object

copy(package: Package, debug=False, id_lookup={})#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

None

static create(package: Package, simple_rules: List[SimpleRule], name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None, immediate: str | None = None) ParallelCompositeRule#

Creates a ParallelCompositeRule enviPath object

Parameters:
  • package – the Package to which the ParallelCompositeRule will belong to

  • simple_rules – a List of SimpleRule objects that are contained within the ParallelCompositeRule

  • name – the name of the ParallelCompositeRule

  • description – the description of the ParallelCompositeRule

  • reactant_filter_smarts – the string that describes the SMARTS filter used for the reactants

  • product_filter_smarts – the string that describes the SMARTS filter used for the products

  • immediate – the string describing the immediate

Returns:

A ParallelCompositeRule enviPath object

get_simple_rules() List[SimpleRule]#

Retrieves the SimpleRule objects contained within the ParallelCompositeRule

Returns:

A List of all the SimpleRule objects contained within the ParallelCompositeRule

class enviPath_python.objects.Pathway(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class that implements a Pathway enviPath object

add_edge(smirks: str | None = None, educts: str | None = None, products: str | None = None, multistep: bool = False, description: str | None = None)#

Adding an edge to an existing pathway. Either provide smirks, or educts AND products.

Parameters:
  • smirks – SMIRKS format of the reaction

  • educts – compound URIs of educts, comma separated

  • products – compound URIs of products, comma separated

  • multistep – If needed, can be set to ‘true’

  • description – The description of the Edge

add_node(smiles, name: str | None = None, depth: int | None = None, description: str | None = None)#

Adds a node to the pathway object, does NOT return the node. Very similar to the node create function, which returns a Node object.

Parameters:
  • smiles – the SMILES of the Node that wants to be added

  • name – the name of the Node

  • depth – the depth of the Node

  • description – the description of the Node

copy(target_package: ~enviPath_python.objects.Package, debug=False) -> (<class 'dict'>, 'Pathway')#

Copies the Pathway to the target_package

Parameters:
  • target_package – Package where the Pathway wants to be copied to

  • debug – whether to add more verbosity or not to the method

Returns:

a dictionary mapping the ids of the parent and copied object, a Pathway object that is a copy of the current one

static create(package: Package, smiles: str, name: str | None = None, description: str | None = None, root_node_only: bool = False, setting: Setting | None = None)#

Creates a Pathway enviPath object

Parameters:
  • package – the Package where the Pathway wants to be added

  • smiles – Smiles of root node compound

  • name – the name of the Pathway

  • description – the description of the Pathway

  • root_node_only – If False, goes to pathway prediction mode

  • setting – Setting for pathway prediction

Returns:

Pathway enviPath object

get_edges() List[Edge]#

Retrieves the edges of the Pathway

Returns:

a List of Edge objects

get_name() str#

Retrieves the name of the Pathway

Returns:

a string of the Pathway name

get_nodes() List[Node]#

Retrieves the nodes of the Pathway

Returns:

a List of Node objects

has_failed() bool#

Checks if the Pathway prediction has failed

Returns:

True if it did, else False

is_completed() bool#

Checks if the Pathway prediction has been completed

Returns:

True if it did, else False

is_running()#

Checks if the Pathway prediction is running

Returns:

True if it did, else False

is_up_to_date() bool#

A boolean checking is the Pathway is up-to-date

Returns:

True if it is, else False

lastmodified() int#

An integer representing the time since last modification

Returns:

The last time where it was modified as an integer

class enviPath_python.objects.PhosphorusContentAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an additional information object for phosphorus content.

This class represents additional information about phosphorus content in influent and effluent.

get_phosphoruscontentEffluent()#

Retrieves the effluent phosphorus content.

Returns:

The phosphorus content in effluent if set; otherwise, None.

Return type:

float or None

get_phosphoruscontentInfluent()#

Retrieves the influent phosphorus content.

Returns:

The phosphorus content in influent if set; otherwise, None.

Return type:

float or None

mandatories = []#
name = 'phosphoruscontent'#
classmethod parse(data_string)#

Parses a string containing phosphorus content information to initialize an instance.

Parameters:

data_string (str) – A semi-colon seperated string in the format ‘phosphoruscontentInfluent;phosphoruscontentEffluent’ or just ‘phosphoruscontentInfluent’.

Returns:

An instance of PhosphorusContentAdditionalInformation populated with the parsed data.

Return type:

PhosphorusContentAdditionalInformation

set_phosphoruscontentEffluent(value)#

Sets the effluent phosphorus content.

Parameters:

value (float) – The phosphorus content in effluent, measured in mg/L.

set_phosphoruscontentInfluent(value)#

Sets the influent phosphorus content, measured in mg/L.

Parameters:

value (float) – The phosphorus content in influent.

class enviPath_python.objects.ProposedIntermediateAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Proposed Intermediate additional information object.

This class represents additional information about proposed intermediates in a study.

get_proposed()#

Gets the proposed intermediate.

Returns:

The proposed intermediate, or None if not set.

Return type:

str or None

mandatories = ['proposed']#
name = 'proposedintermediate'#
classmethod parse(data_string)#

Parses the data_string to create a ProposedIntermediateAdditionalInformation instance.

Parameters:

data_string (str) – A string containing the proposed intermediate.

Returns:

ProposedIntermediateAdditionalInformation instance.

Return type:

ProposedIntermediateAdditionalInformation

set_proposed(value)#

Sets the proposed intermediate.

Parameters:

value (str) – The proposed intermediate.

class enviPath_python.objects.PurposeOfWWTPAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an additional information object for the purpose of a wastewater treatment plant (WWTP).

This class represents additional information about the purpose of a waste water treatment plant.

allowed_values = ['municipal WW', 'industrial WW', 'hospital WW', 'mixed WW (municipal & industrial)', 'other']#
get_purposeofwwtp()#

Retrieves the purpose of the WWTP.

Returns:

The purpose of the WWTP if set; otherwise, None.

Return type:

str

mandatories = ['purposeofwwtp']#
name = 'purposeofwwtp'#
classmethod parse(data_string)#

Parses a string containing the purpose of WWTP information to initialize an instance.

Parameters:

data_string (str) – A string representing the purpose of the WWTP.

Returns:

An instance of PurposeOfWWTPAdditionalInformation populated with the parsed data.

Return type:

PurposeOfWWTPAdditionalInformation

set_purposeofwwtp(value)#

Sets the purpose of the WWTP.

Parameters:

value (str) – The purpose of the WWTP.

class enviPath_python.objects.RateConstantAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an additional information object for rate constant data.

This class represents additional information about rate constant values. Either lower and/or higher can be set. If only one is set, the other one takes the same value.

allowed_corrected = ['', 'sorption corrected', 'abiotic degradation corrected', 'sorption corrected & abiotic degradation corrected']#
allowed_order = ['Zero order', 'First order', 'Second order', 'Pseudo first order']#
get_rateconstantcomment()#

Retrieves the comment related to the rate constant.

Returns:

The comment about the rate constant if set; otherwise, None.

Return type:

str or None

get_rateconstantcorrected()#

Retrieves the corrected rate constant value.

Returns:

The corrected rate constant value if set; otherwise, None.

Return type:

str or None

get_rateconstantlower()#

Retrieves the lower rate constant value.

Returns:

The lower rate constant value if set; otherwise, None.

Return type:

float or None

get_rateconstantorder()#

Retrieves the order of the rate constant.

Returns:

The order of the rate constant if set; otherwise, None.

Return type:

str or None

get_rateconstantupper()#

Retrieves the upper rate constant value.

Returns:

The upper rate constant value if set; otherwise, None.

Return type:

float or None

mandatories = ['rateconstantorder', 'rateconstantlower']#
name = 'rateconstant'#
classmethod parse(data_string)#

Parses a string containing rate constant information to initialize an instance.

Parameters:

data_string (str) – A semicolon separated string in the format ‘rateconstantorder;rateconstantcorrected;rateconstantlower - rateconstantupper;rateconstantcomment’.

Returns:

An instance of RateConstantAdditionalInformation populated with the parsed data.

Return type:

RateConstantAdditionalInformation

set_rateconstantcomment(value)#

Sets the comment related to the rate constant.

Parameters:

value (str) – The comment about the rate constant.

set_rateconstantcorrected(value)#

Sets the corrected rate constant value.

Parameters:

value (str) – The corrected rate constant value. Must be either “”, “sorption corrected”, “abiotic degradation corrected”, “sorption corrected & abiotic degradation corrected”.

set_rateconstantlower(value)#

Sets the lower rate constant value.

Parameters:

value (float) – The lower rate constant value.

set_rateconstantorder(value)#

Sets the order of the rate constant.

Parameters:

value (str) – The order of the rate constant. Must be either “Zero order”, “First order”, “Second order”, “Pseudo first order”.

set_rateconstantupper(value)#

Sets the upper rate constant value.

Parameters:

value (float) – The upper rate constant value.

class enviPath_python.objects.Reaction(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class that implements an enviPath Reaction object

copy(package: ~enviPath_python.objects.Package, debug=False) -> (<class 'dict'>, 'Reaction')#

Copies the Reaction

Parameters:
  • package – the Package to which the copied Reaction will belong to

  • debug – whether to have more verbosity or not

Returns:

a dictionary mapping the ids of the parent and copied object, a Reaction object that is a copy of the parent one

static create(package: Package, smirks: str | None = None, educt: CompoundStructure | None = None, product: CompoundStructure | None = None, name: str | None = None, description: str | None = None, rule: Rule | None = None) Reaction#

Create a Reaction enviPath object

Parameters:
  • package – the Package to which the Reaction will belong to

  • smirks – the SMIRKS of the Reaction

  • educt – the educt of the Reaction

  • product – the product of the Reaction

  • name – the name of the Reaction

  • description – the description of the Reaction

  • rule – the rule that describes the Reaction (if any)

Returns:

A Reaction enviPath object

get_ec_numbers() List[ECNumber]#

Gets the EC numbers of the reaction

Returns:

List of ECNumber objects

get_educts() List[CompoundStructure]#

DEPRECATED Retrieves the educts of the reaction

Returns:

A List of CompoundStructure

get_medline_references() List[object]#

Gets medline references

Returns:

A list of objects

get_pathways() List[Pathway]#

Gets the pathways where this reaction is involved

Returns:

A List of Pathway enviPath objects

get_products()#

Retrieves the products of the reaction

Returns:

A List of CompoundStructure

get_rhea_references() List[str]#

Retrieves the links to Rhea for the given reaction

Returns:

A list of links to rhea with similar reactions

get_rule() Rule | None#

Retrieves the rule of the reaction

Returns:

The Rule that describes the Reaction

get_smirks() str#

Gets the SMIRKS of the Reaction

Returns:

SMIRKS of the Reaction

get_substrates() List[CompoundStructure]#

Retrieves the substrates of the reaction

Returns:

A List of CompoundStructure

is_multistep() bool#

Check for multistep reaction

Returns:

True if multistep else False

class enviPath_python.objects.RedoxAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates an additional information object for redox properties.

This class represents additional information about redox properties.

allowed_types = ['aerob', 'anaerob', 'anaerob: iron-reducing', 'anaerob: sulfate-reducing', 'anaerob: methanogenic conditions', 'oxic', 'nitrate-reducing']#
get_redoxType() str | None#

Get the redoxType parameter.

Returns:

The value of redoxType parameter, or None if not set.

Return type:

str or None

mandatories = ['redoxType']#
name = 'redox'#
classmethod parse(data_string: str) RedoxAdditionalInformation#

Parses the data_string to create a RedoxAdditionalInformation instance.

Parameters:

data_string (str) – String containing redoxType data.

Returns:

RedoxAdditionalInformation instance.

Return type:

RedoxAdditionalInformation

set_redoxType(value)#

Sets the redoxType parameter.

Parameters:

value (str) – The value of redoxType.

class enviPath_python.objects.RedoxPotentialAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a redox potential additional information class for redox potential data.

This class represents additional information about redox potential values for water and sediment.

get_highPotentialSediment()#

Get the high redox potential for sediment.

Returns:

The high potential value for sediment, or None if not set.

Return type:

float or None

get_highPotentialWater()#

Get the high redox potential for water.

Returns:

The high potential value for water, or None if not set.

Return type:

float or None

get_lowPotentialSediment()#

Get the low redox potential for sediment.

Returns:

The low potential value for sediment, or None if not set.

Return type:

float or None

get_lowPotentialWater()#

Get the low redox potential for water.

Returns:

The low potential value for water, or None if not set.

Return type:

float or None

mandatories = []#
name = 'redoxpotential'#
classmethod parse(data_string)#

Parses the data_string to create a RedoxPotentialAdditionalInformation instance.

Parameters:

data_string (str) – a semicolon separated string in the format ‘lowPotentialWater - highPotentialWater;lowPotentialSediment - highPotentialSediment’

Returns:

RedoxPotentialAdditionalInformation instance.

Return type:

RedoxPotentialAdditionalInformation

set_highPotentialSediment(value)#

Sets the high redox potential for sediment.

Parameters:

value (float) – The high potential value for sediment, measured in mV.

set_highPotentialWater(value)#

Sets the high redox potential for water.

Parameters:

value (float) – The high potential value for water, measured in mV.

set_lowPotentialSediment(value)#

Sets the low redox potential for sediment.

Parameters:

value (float) – The low potential value for sediment, measured in mV.

set_lowPotentialWater(value)#

Sets the low redox potential for water.

Parameters:

value (float) – The low potential value for water, measured in mV.

class enviPath_python.objects.ReferenceAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a reference additional information object.

It stores information about the PubMed ID or just any other reference.

get_reference()#

Get the reference.

Returns:

The reference, or None if not set.

Return type:

str or None

mandatories = ['reference']#
name = 'reference'#
classmethod parse(data_string)#

Parses the data_string to create a ReferenceAdditionalInformation instance.

Parameters:

data_string (str) – String containing reference data.

Returns:

ReferenceAdditionalInformation instance.

Return type:

ReferenceAdditionalInformation

set_reference(value)#

Sets the reference.

Parameters:

value (str) – The reference, either PubMed ID or any other reference.

class enviPath_python.objects.ReferringScenarioAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Class that implements a Referring Scenario Additional Information object.

A referring scenario is a scenario that refers to another one, from which it will extract information frm

get_referringscenario()#

Gets the scenario that it is being referred

Returns:

The URL to the scenario being referred

Return type:

str

mandatories = ['referringscenario']#
name = 'referringscenario'#
classmethod parse(data_string)#
set_referringscenario(value)#

Sets the referring scenario identifier

Parameters:

value (str) – the URL to the scenario it wants to refer to

class enviPath_python.objects.RelativeReasoning(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject

Class that implements a RelativeReasoning enviPath object

classify_smiles(smiles: str)#
classify_structure(structure: CompoundStructure)#

Uses the RelativeReasoning model to classify a given CompoundStructure

Parameters:

structure – The CompoundStructure to classify

Returns:

A JSON object with the classification response of the model

copy(package: Package, debug=False)#

Copies the RelativeReasoning object

Parameters:
  • package – the package where the object wants to be copied to

  • debug – whether to have more verbosity or not

Returns:

a copy of the current RelativeReasoning object

static create(package: Package, packages: List[Package], classifier_type: ClassifierType, eval_type: EvaluationType, association_type: AssociationType, evaluation_packages: List[Package] | None = None, fingerprinter_type: FingerprinterType = FingerprinterType.ENVIPATH_FINGERPRINTER, quickbuild: bool = True, use_p_cut: bool = False, cut_off: float = 0.5, evaluate_later: bool = True, name: str | None = None) RelativeReasoning#

Create a relative reasoning object

Parameters:
  • package – The package object in which the model is created

  • packages – List of package objects on which the model is trained

  • classifier_type

    Classifier options:

    • Rule-Based : ClassifierType(“RULEBASED”)

    • Machine Learning-Based (MLC-BMaD) : ClassifierType(“MLCBMAD”)

    • Machine Learning-Based (ECC) : ClassifierType(“ECC”)

  • eval_type

    Evaluation type:

    • Single Generation : EvaluationType(“single”)

    • Single + Multiple Generation : EvaluationType(“multigen”)

  • association_type

    Association type:

    • AssociationType(“DATABASED”)

    • AssociationType(“CALCULATED”), default

  • evaluation_packages – List of package objects on which the model is evaluated. If none, the classifier is evaluated in a 100-fold holdout model using a 90/10 split ratio.

  • fingerprinter_type – Default: MACS Fingerprinter (“ENVIPATH_FINGERPRINTER”)

  • quickbuild – Faster evaluation, default: False

  • use_p_cut – Default: False

  • cut_off – The cutoff threshold used in the evaluation. Default: 0.5

  • evaluate_later – Only build the model, and not proceed to evaluation. Default: False

  • name – Name of the model

Returns:

RelativeReasoning object

download_arff() str#
get_model_status() ModelStatus#
class enviPath_python.objects.ReviewableEnviPathObject(requester, *args, **kwargs)#

Bases: enviPathObject, ABC

add_scenario(scenario: Scenario) None#

Adds the given scenario to the current object

Parameters:

scenario (Scenario) – the Scenario object to be added

Returns:

None

abstract copy(package: Package, debug=False)#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

None

get_aliases() List[str]#

Get the aliases of this object

Returns:

A list of the aliases

Return type:

list

get_review_status() str#

Gets if the current object has been reviewed.

Returns:

A string where if the object is reviewed has value ‘reviewed’

Return type:

str

get_scenarios() List[Scenario]#

Gets the scenarios of this object

Returns:

A list of scenarios

Return type:

list

is_reviewed() bool#

Checks if the object has been review or not

Returns:

True if the object is reviewed, else False

Return type:

bool

class enviPath_python.objects.Rule(requester, *args, **kwargs)#

Bases: ReviewableEnviPathObject, ABC

Class that implements an enviPath Rule

apply_to_compound(compound: Compound) List[str]#

Applies the given Rule to the specified Compound

Parameters:

compound – The Compound to which the Rule wants to be applied

Returns:

A List of strings defining all the possible transformations

apply_to_smiles(smiles) List[str]#

Applies the given Rule to the specified SMILES

Parameters:

smiles – The smiles to which the Rule wants to be applied

Returns:

A List of strings defining all the possible transformations

abstract static create(package: Package, smirks: str, name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None)#
get_ec_numbers() List[object]#

Gets the EC Numbers associated with the given rule

Returns:

A list of objects representing EC Numbers

get_pathways() List[Pathway]#

Retrieves the pathways where this rule is used

Returns:

The List of Pathway objects that include that rule

get_product_filter_smarts() str#

Retrieve the SMARTS filter used in products

Returns:

A string defining that filter

get_product_smarts() str#

Retrieves the SMARTS of the products

Returns:

A string describing the product’s SMARTS

get_reactant_filter_smarts() str#

Retrieve the SMARTS filter used in reactants

Returns:

A string defining that filter

get_reactant_smarts() str#

Retrieves the SMARTS of the reactants

Returns:

A string describing the reactant’s SMARTS

get_reactions() List[Reaction]#

Retrieves the reactions associated with the given rule

Returns:

A List of Reaction objects associated with the given rule

static get_rule_type(obj: dict)#

Returns the type of rule

Parameters:

obj – a dictionary that contains the information of the type of rule

Returns:

The type of the Rule

get_transformations() str#

Retrieve a string defining the transformations where this rule is involved.

Returns:

The transformations involved in the rule

included_in_composite_rule() List[Rule]#

Returns all the rules that are included on the current composite rule

Returns:

A List of Rules in the current composite rule

is_composite_rule() bool#

Check whether the rule is composite or not

Returns:

True if it is, else False

class enviPath_python.objects.RuleLikelihoodAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Rule Likelihood additional information object.

This class represents additional information about the likelihood of a rule.

allowed_values = ['VERY_LIKELY', 'LIKELY', 'POSSIBLE', 'UNLIKELY', 'VERY_UNLIKELY']#
get_ruleLikelihood()#

Gets the rule likelihood.

Returns:

The rule likelihood, or None if not set.

Return type:

str or None

mandatories = ['ruleLikelihood']#
name = 'rulelikelihood'#
classmethod parse(data_string)#

Parses the data_string to create a RuleLikelihoodAdditionalInformation instance.

Parameters:

data_string (str) – A string containing the rule likelihood.

Returns:

RuleLikelihoodAdditionalInformation instance.

Return type:

RuleLikelihoodAdditionalInformation

set_ruleLikelihood(value)#

Sets the rule likelihood.

Parameters:

value (str) – The likelihood of the rule, must be one of “VERY_LIKELY”, “LIKELY”, “POSSIBLE”, “UNLIKELY”, “VERY_UNLIKELY”.

class enviPath_python.objects.SampleLocationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a sample location additional information object.

This class represents additional information about the sample location of water-sediment studies.

get_samplelocation()#

Retrieves the sample location.

Returns:

The sample location if set; otherwise, None.

Return type:

str or None

mandatories = ['samplelocation']#
name = 'samplelocation'#
classmethod parse(data_string)#

Parses a string containing sample location information to initialize an instance.

Parameters:

data_string (str) – A string representing the sample location.

Returns:

An instance of SampleLocationAdditionalInformation populated with the parsed data.

Return type:

SampleLocationAdditionalInformation

set_samplelocation(value)#

Sets the sample location.

Parameters:

value (str) – The sample location.

class enviPath_python.objects.SamplingDepthAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a sampling depth additional information object.

This class represents additional information about sampling depths.

get_samplingDepthMax()#

Get the maximum sampling depth.

Returns:

The maximum sampling depth, or None if not set.

Return type:

float or None

get_samplingDepthMin()#

Get the minimum sampling depth.

Returns:

The minimum sampling depth, or None if not set.

Return type:

float or None

mandatories = ['samplingDepthMin']#
name = 'samplingdepth'#
classmethod parse(data_string)#

Parses the data_string to create a SamplingDepthAdditionalInformation instance.

Parameters:

data_string (str) – A semicolon separated string in the format “samplingDepthMin;samplingDepthMax”

Returns:

SamplingDepthAdditionalInformation instance.

Return type:

SamplingDepthAdditionalInformation

set_samplingDepthMax(value)#

Sets the maximum sampling depth.

Parameters:

value (float) – The maximum sampling depth, measured in cm.

set_samplingDepthMin(value)#

Sets the minimum sampling depth.

Parameters:

value (float) – The minimum sampling depth, measured in cm.

class enviPath_python.objects.Scenario(requester, *args, **kwargs)#

Bases: enviPathObject

Class for the Scenario enviPath object

copy(package: ~enviPath_python.objects.Package, debug=False, id_lookup={}) -> (<class 'dict'>, 'Scenario')#

Copy the Scenario object

Parameters:
  • package – the package where the Scenario wants to be added to

  • debug – whether to have more verbosity (True) or not (False)

  • id_lookup – in case the parent Scenario has a referring scenario, a dictionary that maps the id of the parent scenario to the referred one

Returns:

a dictionary similar to id_lookup and the copied Scenario

static create(package: Package, name: str | None = None, description: str | None = None, date: str | None = None, scenariotype: str | None = None, additional_information: List[AdditionalInformation] | None = None, referring_scenario_id: str | None = None, collection_URI: str | None = None) Scenario#

Creates a Scenario within the specified package. Scenario data can be added with class AdditionalInformation.

Parameters:
  • package – Package object in which the Scenario will be created

  • name – Name of Scenario

  • description – Description of Scenario

  • date – The date at which the scenario was created

  • scenariotype – Use predefined scenario type (possible: Soil, Sludge, Sediment, ..)

  • additional_information – Scenario data content provided as a AdditionalInformation object

  • referring_scenario_id – Provide referring scenario ID, a related scenario will be created

  • collection_URI – attach an existing AdditionalInformation object to the scenario (by ID) - not working

Returns:

Scenario object

get_additional_information() List[AdditionalInformation]#

Gets the additional information from the existing Scenario

Returns:

A list containing the AdditionalInformation

get_linked_objects() List[ReviewableEnviPathObject]#

Gets the objects that are linked to the current scenario.

Returns:

A list of objects that have this scenario attached

Return type:

List

get_referring_scenario() Scenario#

Gets the referring scenario

Returns:

A Scenario object

get_scenariotype()#

Returns the type of scenario :return:

has_referring_scenario() bool#

Function to check whether referringScenario exists or not

Returns:

True if it exists else False

update_scenario(additional_information: List[AdditionalInformation])#

Updates an existing scenario

Parameters:

additional_information – Scenario data content provided as a AdditionalInformation object

Returns:

The updated scenario

Return type:

Scenario

class enviPath_python.objects.SedimentPorosityAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a sediment porosity additional information object.

This class represents additional information about sediment porosity.

get_sedimentporosity()#

Get the sediment porosity.

Returns:

The sediment porosity, or None if not set.

Return type:

str or None

mandatories = ['sedimentporosity']#
name = 'sedimentporosity'#
classmethod parse(data_string)#

Parses the data_string to create a SedimentPorosityAdditionalInformation instance.

Parameters:

data_string (str) – String containing sediment porosity data.

Returns:

SedimentPorosityAdditionalInformation instance.

Return type:

SedimentPorosityAdditionalInformation

set_sedimentporosity(value)#

Sets the sediment porosity.

Parameters:

value (float) – The sediment porosity.

class enviPath_python.objects.SequentialCompositeRule(requester, *args, **kwargs)#

Bases: Rule

Class that implements a SequentialCompositeRule enviPath object

copy(package: Package, debug=False, id_lookup={})#

Copies the object into the given package

Parameters:
  • package (Package) – the package to be copied to

  • debug (bool) – whether to add more verbosity or not to the method

Returns:

None

static create(package: Package, simple_rules: List[SimpleRule], name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None, immediate: str | None = None) SequentialCompositeRule#

Creates a SequentialCompositeRule enviPath object

Parameters:
  • package – the Package to which the SequentialCompositeRule will belong to

  • simple_rules – a List of SimpleRule objects that are contained within the SequentialCompositeRule

  • name – the name of the SequentialCompositeRule

  • description – the description of the SequentialCompositeRule

  • reactant_filter_smarts – the string that describes the SMARTS filter used for the reactants

  • product_filter_smarts – the string that describes the SMARTS filter used for the products

  • immediate – the string describing the immediate

Returns:

A SequentialCompositeRule enviPath object

get_simple_rules() List[SimpleRule]#

Retrieves the SimpleRule objects contained within the SequentialCompositeRule

Returns:

A List of all the SimpleRule objects contained within the SequentialCompositeRule

class enviPath_python.objects.Setting(requester, *args, **kwargs)#

Bases: enviPathObject

add_normalization_rule(smirks: str, name: str | None = None, description: str | None = None)#
add_package(package: Package)#
add_packages(packages: List[Package])#
static create(ep, packages: List[Package], name: str | None = None, depth_limit: int | None = None, node_limit: int | None = None, relative_reasoning: RelativeReasoning | None = None, cut_off: float = 0.5, evaluation_type: EvaluationType | None = None, min_carbon: int | None = None, terminal_compounds: List[Compound] | None = None)#
get_included_packages() List[Package]#
get_normalization_rules() List[NormalizationRule]#
get_truncationstrategy() TruncationStrategy | None#
remove_package(package: Package)#
remove_packages(packages: List[Package])#
set_name(name: str) None#
class enviPath_python.objects.SimpleRule(requester, *args, **kwargs)#

Bases: Rule

Class that implements an enviPath SimpleRule object

copy(package: Package, debug=False)#

Copies the SimpleRule

Parameters:
  • package – the Package to which the SimpleRule will belong to

  • debug – whether to have more verbosity or not

Returns:

a dictionary mapping the ids of the parent and copied object, a SimpleRule object that is a copy of the parent one

static create(package: Package, smirks: str, name: str | None = None, description: str | None = None, reactant_filter_smarts: str | None = None, product_filter_smarts: str | None = None, immediate: str | None = None, rdkitrule: bool | None = None) SimpleRule#

Creates a SimpleRule object

Parameters:
  • package – the Package to which the SimpleRule will belong to

  • smirks – the SMIRKS of the SimpleRule

  • name – the name of the SimpleRule

  • description – the description of the SimpleRule

  • reactant_filter_smarts – the string that describes the SMARTS filter used for the reactants

  • product_filter_smarts – the string that describes the SMARTS filter used for the products

  • immediate – the string describing the immediate

  • rdkitrule – a boolean stating whether the rule is a rdkit rule or not

Returns:

A SimpleRule enviPath object

get_smirks() str#

Retrieves the SMIRKS of the SimpleRule

Returns:

The SMIRKS of the SimpleRule in string format

class enviPath_python.objects.SludgeRetentionTimeAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a sludge retention time additional information object.

This class represents additional information about sludge retention time.

allowed_values = ['sludge age', 'sludge retention time']#
get_sludgeretentiontime()#

Get the sludge retention time.

Returns:

The sludge retention time, or None if not set.

Return type:

str or float or None

get_sludgeretentiontimeType()#

Get the type of sludge retention time.

Returns:

The type of sludge retention time, or None if not set.

Return type:

float or None

mandatories = ['sludgeretentiontimeType', 'sludgeretentiontime']#
name = 'sludgeretentiontime'#
classmethod parse(data_string)#

Parses the data_string to create a SludgeRetentionTimeAdditionalInformation instance.

Parameters:

data_string (str) – A semicolon separated string in the format “sludgeretentiontimeType;sludgeretentiontime”.

Returns:

SludgeRetentionTimeAdditionalInformation instance.

Return type:

SludgeRetentionTimeAdditionalInformation

set_sludgeretentiontime(value)#

Sets the sludge retention time.

Parameters:

value (float) – The sludge retention time, given in days.

set_sludgeretentiontimeType(value)#

Sets the type of sludge retention time.

Parameters:

value (str) – The type of sludge retention time, either ‘sludge age’ or ‘sludge retention time’.

class enviPath_python.objects.SoilClassificationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a soil classification system additional information object.

This class represents additional information about soil classification systems.

allowed_values = ['USDA', 'UK_ADAS', 'UK ADAS', 'UK', 'DE', 'International']#
get_soilclassificationsystem()#

Get the soil classification system.

Returns:

The soil classification system, or None if not set.

Return type:

str or None

mandatories = ['soilclassificationsystem']#
name = 'soilclassificationsystem'#
classmethod parse(data_string)#

Parses the data_string to create a SoilClassificationAdditionalInformation instance.

Parameters:

data_string (str) – String containing soil classification system data.

Returns:

SoilClassificationAdditionalInformation instance.

Return type:

SoilClassificationAdditionalInformation

set_soilclassificationsystem(value)#

Sets the soil classification system.

Parameters:

value (str) – The soil classification system. Must be either ‘USDA’, ‘UK_ADAS’, ‘UK’, ‘DE’, ‘International’.

class enviPath_python.objects.SoilSourceAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a soil source additional information object.

This class represents additional information about soil source, which is the sample location of the soil.

get_soilsourcedata()#

Get the soil source data.

Returns:

The soil source data, or None if not set.

Return type:

str or None

mandatories = ['soilsourcedata']#
name = 'soilsource'#
classmethod parse(data_string)#

Parses the data_string to create a SoilSourceAdditionalInformation instance.

Parameters:

data_string (str) – String containing soil source data.

Returns:

SoilSourceAdditionalInformation instance.

Return type:

SoilSourceAdditionalInformation

set_soilsourcedata(value)#

Sets the soil source data.

Parameters:

value (str) – The soil source data.

class enviPath_python.objects.SoilTexture1AdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a soil texture additional information object.

This class represents additional information about soil texture types. Can also be used for classifying sludge and sediment types.

allowed_types = ['CLAY', 'SANDY CLAY', 'SILTY CLAY', 'SANDY CLAY LOAM', 'SANDY LOAM', 'SILTY CLAY LOAM', 'SAND', 'LOAMY SAND', 'LOAM', 'SILT LOAM', 'SILT', 'CLAY LOAM', 'SILTY SAND', 'SANDY SILT LOAM']#
get_soilTextureType()#

Gets the soil texture type.

Returns:

The soil texture type, or None if not set.

Return type:

str or None

mandatories = ['soilTextureType']#
name = 'soiltexture1'#
classmethod parse(data_string)#

Parses the data_string to create a SoilTexture1AdditionalInformation instance.

Parameters:

data_string (str) – String containing soil texture type data.

Returns:

SoilTexture1AdditionalInformation instance.

Return type:

SoilTexture1AdditionalInformation

set_soilTextureType(value)#

Sets the soil texture type.

Parameters:

value (str) – The soil texture type.

Raises:

ValueError – If the value is not one of the allowed soil texture types.

class enviPath_python.objects.SoilTexture2AdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a soil texture additional information object.

This class represents additional information about soil texture components: sand, silt, and clay. Can also be used for classifying sludge and sediment types.

get_clay()#

Gets the percentage of clay in the soil.

Returns:

The clay percentage, or None if not set.

Return type:

float or None

get_sand()#

Gets the percentage of sand in the soil.

Returns:

The sand percentage, or None if not set.

Return type:

float or None

get_silt()#

Gets the percentage of silt in the soil.

Returns:

The silt percentage, or None if not set.

Return type:

float or None

mandatories = ['sand', 'silt', 'clay']#
name = 'soiltexture2'#
classmethod parse(data_string)#

Parses the data_string to create a SoilTexture2AdditionalInformation instance.

Parameters:

data_string (str) – String containing soil texture data in the format ‘Soil texture 2: 45.0% sand; 34.0% silt; 34.0% clay’.

Returns:

SoilTexture2AdditionalInformation instance.

Return type:

SoilTexture2AdditionalInformation

set_clay(value)#

Sets the percentage of clay in the soil.

Parameters:

value (float) – The clay percentage, measured in %.

set_sand(value)#

Sets the percentage of sand in the soil.

Parameters:

value (float) – The sand percentage, measured in %.

set_silt(value)#

Sets the percentage of silt in the soil.

Parameters:

value (float) – The silt percentage, measured in %.

class enviPath_python.objects.SolventForCompoundSolutionAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a solvent for compound solution additional information object.

This class represents additional information about solvents used for compound solutions.

get_proportion()#

Get the ratio of the solvents.

Returns:

the ratio of the solvents

Return type:

str

get_solventforcompoundsolution1()#

Get the first solvent used for compound solution.

Returns:

The first solvent used for compound solution, or None if not set.

Return type:

float or None

get_solventforcompoundsolution2()#

Get the second solvent used for compound solution.

Returns:

The second solvent used for compound solution, or None if not set.

Return type:

float or None

get_solventforcompoundsolution3()#

Get the third solvent used for compound solution.

Returns:

The third solvent used for compound solution, or None if not set.

Return type:

float or None

mandatories = ['solventforcompoundsolution1']#
name = 'solventforcompoundsolution'#
classmethod parse(data_string)#

Parses the data_string to create a SolventForCompoundSolutionAdditionalInformation instance.

Parameters:

data_string (str) – Semicolon-separated string in the format e.g “solventforcompoundsolution1;solventforcompoundsolution2;solventforcompoundsolution3;proportion”

Returns:

SolventForCompoundSolutionAdditionalInformation instance.

Return type:

SolventForCompoundSolutionAdditionalInformation

set_proportion(value)#

Sets the ratio of the solvents.

Parameters:

value (str) – the ratio in the form “1:3”

set_solventforcompoundsolution1(value)#

Sets the first solvent used for compound solution.

Parameters:

value (str) – The first solvent used for compound solution. Valid solvents are “MeOH”, “EtOH”, “H2O”, “DMSO”, “acetone”,”H&#8322O”.

set_solventforcompoundsolution2(value)#

Sets the second solvent used for compound solution.

Parameters:

value (str) – The second solvent used for compound solution. Valid solvents are “MeOH”, “EtOH”, “H2O”, “DMSO”, “acetone”,”H&#8322O”.

set_solventforcompoundsolution3(value)#

Sets the third solvent used for compound solution.

Parameters:

value (str) – The third solvent used for compound solution. Valid solvents are “MeOH”, “EtOH”, “H2O”, “DMSO”, “acetone”,”H&#8322O”.

valid_solvents = {'ACETONE': 'ACETONE', 'DMSO': 'DMSO', 'ETOH': 'EtOH', 'H&#8322O': 'H&#8322O', 'H2O': 'H&#8322O', 'MEOH': 'MeOH'}#
class enviPath_python.objects.SourceOfLiquidMatrixAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a source of liquid matrix additional information object.

This class represents additional information about the source of a liquid matrix.

get_sourceofliquidmatrix()#

Gets the source of the liquid matrix.

Returns:

The source of the liquid matrix, or None if not set.

Return type:

str or None

mandatories = ['sourceofliquidmatrix']#
name = 'sourceofliquidmatrix'#
classmethod parse(data_string)#

Parses the data_string to create a SourceOfLiquidMatrixAdditionalInformation instance.

Parameters:

data_string (str) – String containing the source of the liquid matrix.

Returns:

SourceOfLiquidMatrixAdditionalInformation instance.

Return type:

SourceOfLiquidMatrixAdditionalInformation

set_sourceofliquidmatrix(value)#

Sets the source of the liquid matrix.

Parameters:

value (str) – The source of the liquid matrix.

class enviPath_python.objects.SourceScenarioAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a source scenario additional information object.

This class represents additional information about the source scenario represented as the scource scenario ID.

get_sourcescenario()#

Gets the source scenarios.

Returns:

The source scenario, or None if not set.

Return type:

str or None

mandatories = ['sourcescenario']#
name = 'sourcescenario'#
classmethod parse(data_string)#

Parses the data_string to create a SourceScenarioAdditionalInformation instance.

Parameters:

data_string (str) – String containing the source scenario.

Returns:

SourceScenarioAdditionalInformation instance.

Return type:

SourceScenarioAdditionalInformation

set_sourcescenario(value)#

Sets the source scenarios.

Parameters:

value (str) – A comma-separated string joining all the URLs of the source scenarios.

class enviPath_python.objects.SpikeCompoundAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Spike Compound additional information object.

This class represents additional information about spike compounds. It takes either an existing compound or creates a new one using SMILES.

get_compound_structure()#

Gets the spike compound information.

Returns:

The spike compound information, or None if not set.

Return type:

CompoundStructure or None

mandatories = []#
name = 'spikecompound'#
classmethod parse(data_string)#
set_compound_structure(value)#

Sets the spike compound structure.

Parameters:

value (CompoundStructure) – A CompoundStructure object representing the compound that was used for spiking.

class enviPath_python.objects.SpikeConcentrationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Spike Concentration additional information object.

This class represents additional information about spike concentrations.

get_spikeConcentration()#

Gets the spike concentration.

Returns:

The spike concentration value, or None if not set.

Return type:

float or None

get_unit()#
mandatories = ['spikeConcentration', 'spikeconcentrationUnit']#
map_units = {'&#956g/L': 'MUG_PER_L', '&#956g/kg dry soil': 'MUG_PER_KG_DRY', '&#956g/kg wet soil': 'MUG_PER_KG_WET', 'mg/L': 'MG_PER_L', 'mg/kg dry soil': 'MG_PER_KG_DRY', 'mg/kg wet soil': 'MG_PER_KG_WET', 'ppm': 'PPM'}#
name = 'spikeconcentration'#
classmethod parse(data_string)#

Parses the data_string to create a SpikeConcentrationAdditionalInformation instance.

Parameters:

data_string (str) – A string containing spike concentration data in the format ‘spikeConcentration;spikeconcentrationUnit’.

Returns:

SpikeConcentrationAdditionalInformation instance.

Return type:

SpikeConcentrationAdditionalInformation

set_spikeConcentration(value)#

Sets the spike concentration.

Parameters:

value (float) – The spike concentration value.

set_spikeconcentrationUnit(value)#

Sets the unit for the spike concentration. Must be one of the following: ‘MUG_PER_L’, ‘MUG_PER_KG_WET’, ‘MUG_PER_KG_DRY’, ‘MG_PER_L’, ‘MG_PER_KG_WET’, ‘MG_PER_KG_DRY’, ‘PPM’

Parameters:

value (str) – The unit for the spike concentration.

class enviPath_python.objects.TSSAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a TSS (Total Suspended Solids) additional information object.

This class represents additional information about the TSS values. Start and/or End values can be set.

get_ttsEnd()#

Gets the end value of volatile TSS.

Returns:

The end value of TSS, or None if not set.

Return type:

float or None

get_ttsStart()#

Gets the start value of TSS.

Returns:

The start value of TSS, or None if not set.

Return type:

float or None

mandatories = ['ttsStart', 'ttsEnd']#
name = 'tts'#
classmethod parse(data_string)#

Parses the data_string to create a TSSAdditionalInformation instance.

Parameters:

data_string (str) – A string containing TSS data in the format ‘start_value - end_value’.

Returns:

TSSAdditionalInformation instance.

Return type:

TSSAdditionalInformation

set_ttsEnd(value)#

Sets the end value of TSS.

Parameters:

value (float) – The end value of TSS, measured in g/L.

set_ttsStart(value)#

Sets the start value of TSS.

Parameters:

value (float) – The start value of TSS, measured in g/L.

class enviPath_python.objects.TemperatureAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a TemperatureAdditionalInformation object.

This class represents additional information about the temperature. Minimal and maximal temperature values can be set.

get_temperatureMax()#

Gets the maximum temperature.

Returns:

The maximum temperature if set; otherwise, None.

Return type:

float or None

get_temperatureMin()#

Gets the minimum temperature.

Returns:

The minimum temperature if set; otherwise, None.

Return type:

float or None

mandatories = ['temperatureMin']#
name = 'temperature'#
classmethod parse(data_string)#

Parses the data_string to create a TemperatureAdditionalInformation instance.

Parameters:

data_string (str) – A semicolon-separated string in the format ‘temperatureMin;temperatureMax’.

Returns:

TemperatureAdditionalInformation instance.

Return type:

TemperatureAdditionalInformation

set_temperatureMax(value)#

Sets the maximum temperature.

Parameters:

value (float) – The maximum temperature, measured in degrees Celsius.

set_temperatureMin(value)#

Sets the minimum temperature.

Parameters:

value (float) – The minimum temperature, measured in degrees Celsius.

class enviPath_python.objects.TotalOrganicCarbonAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a TotalOrganicCarbonAdditionalInformation object.

This class represents additional information about total organic carbon (TOC) values.

get_totalorganiccarbonEnd()#

Gets the end value for total organic carbon.

Returns:

The end value for total organic carbon if set; otherwise, None.

Return type:

float or None

get_totalorganiccarbonStart()#

Gets the start value for total organic carbon.

Returns:

The start value for total organic carbon if set; otherwise, None.

Return type:

float or None

mandatories = ['totalorganiccarbonStart']#
name = 'totalorganiccarbon'#
classmethod parse(data_string)#

Parses the data_string to create a TotalOrganicCarbonAdditionalInformation instance.

Parameters:

data_string (str) – A semicolon-separated string in the format ‘totalorganiccarbonStart;totalorganiccarbonEnd’.

Returns:

TotalOrganicCarbonAdditionalInformation instance.

Return type:

TotalOrganicCarbonAdditionalInformation

set_totalorganiccarbonEnd(value)#

Sets the end value for total organic carbon.

Parameters:

value (float) – The end value for total organic carbon, measured in percentage.

Raises:

ValueError – If the value is not a float.

set_totalorganiccarbonStart(value)#

Sets the start value for total organic carbon.

Parameters:

value (float) – The start value for total organic carbon, measured in percentage.

Raises:

ValueError – If the value is not a float.

class enviPath_python.objects.TruncationStrategy(requester, *args, **kwargs)#

Bases: enviPathObject

class enviPath_python.objects.TypeOfAdditionAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Type of Addition additional information object.

This class represents additional information about the type of compound addition which is either spiking in solvent,

plating or some other type.

allowed_values = ['spiking in solvent', 'plating', 'other']#
get_typeofaddition()#

Gets the type of addition.

Returns:

The type of addition if set; otherwise, None.

Return type:

str or None

mandatories = ['typeofaddition']#
name = 'typeofaddition'#
classmethod parse(data_string)#

Parses the data_string to create a TypeOfAdditionAdditionalInformation instance.

Parameters:

data_string (str) – A string containing the type of addition.

Returns:

TypeOfAdditionAdditionalInformation instance.

Return type:

TypeOfAdditionAdditionalInformation

set_typeofaddition(value)#

Sets the type of addition. Either ‘spiking in solvent’, ‘plating’, ‘other’

Parameters:

value (str) – The type of addition.

class enviPath_python.objects.TypeOfAerationAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Type of Aeration additional information object.

This class represents additional information about the type of aeration.

allowed_values = ['stirring', 'shaking', 'bubbling air', 'bubbling air and stirring', 'other']#
get_typeofaeration()#

Gets the type of aeration.

Returns:

The type of aeration, or None if not set.

Return type:

str or None

mandatories = ['typeofaeration']#
name = 'typeofaeration'#
classmethod parse(data_string)#

Parses the data_string to create a TypeOfAerationAdditionalInformation instance.

Parameters:

data_string (str) – A string containing the type of aeration.

Returns:

TypeOfAerationAdditionalInformation instance.

Return type:

TypeOfAerationAdditionalInformation

set_typeofaeration(value)#

Sets the type of aeration. Must be either “stirring”, “shaking”, “bubbling air”, “bubbling air and stirring”, “other”.

Parameters:

value (str) – The type of aeration.

class enviPath_python.objects.User(requester, *args, **kwargs)#

Bases: enviPathObject

Class that implements a User enviPath object

static activate(ep, username, token) bool#

Activates the specified username

Parameters:
  • ep – an enviPath object

  • username – the username of the User that wants to be activated

  • token – the activation token

Returns:

True if the User was successfully activated, else False

static create(ep, email: str, username: str, password: str)#
get_default_group() Group#

Gets the default Group of the User

Returns:

A Group object to which the User belonged by default

get_default_package() Package#

Gets the Package the User belonged by default

Returns:

A Package enviPath object

get_default_setting() Setting | None#

Gets the Setting the User had by default

Returns:

A Setting enviPath object

get_email() str#

Gets the email of the User

Returns:

an email in string format

get_forename() str#

Gets the forename of the User

Returns:

a forename in string format

get_group(group_id) Group#

Gets the Group of the User

Parameters:

group_id – The identifier of a Group object

Returns:

The Group object to which the User belongs

get_groups() List[Group]#

Gets all the groups the User belongs to

Returns:

a List of Group enviPath objects

get_setting(setting_id)#

Gets a Setting of the User

Parameters:

setting_id – The identifier of a Setting object

Returns:

The Setting object to which the User belongs

get_settings() List[Setting]#

Gets all the settings the User has

Returns:

a List of Setting enviPath objects

get_surname() str#

Gets the surname of the User

Returns:

a surname in string format

static register(ep, email: str, username: str, password: str)#

Alias for ‘create()’.

Parameters:
  • ep – an enviPath object

  • email – the email of the User that wants to be registered

  • username – the username of the User

  • password – the password of the User

Returns:

A User enviPath object

class enviPath_python.objects.VolatileTSSAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Volatile TSS (Total Suspended Solids) additional information object.

This class represents additional information about the volatile TSS values. Start and/or End values can be set.

get_volatilettsEnd()#

Gets the end value of volatile TSS.

Returns:

The end value of volatile TSS, or None if not set.

Return type:

float or None

get_volatilettsStart()#

Gets the start value of volatile TSS.

Returns:

The start value of volatile TSS, or None if not set.

Return type:

float or None

mandatories = []#
name = 'volatiletts'#
classmethod parse(data_string)#

Parses the data_string to create a VolatileTSSAdditionalInformation instance.

Parameters:

data_string (str) – A string containing volatile TSS data in the format ‘start_value - end_value’.

Returns:

VolatileTSSAdditionalInformation instance.

Return type:

VolatileTSSAdditionalInformation

set_volatilettsEnd(value)#

Sets the end value of volatile TSS.

Parameters:

value (float) – The end value of volatile TSS, measured in g/L.

set_volatilettsStart(value)#

Sets the start value of volatile TSS.

Parameters:

value (float) – The start value of volatile TSS, measured in g/L.

class enviPath_python.objects.WaterStorageCapacityAdditionalInformation(*args, **kwargs)#

Bases: AdditionalInformation

Creates a Water Storage Capacity additional information object.

This class represents additional information about water storage capacity in soil data.

get_maximumWaterstoragecapacity()#

Gets the maximum water storage capacity.

Returns:

The maximum water storage capacity, or None if not set.

Return type:

float or None

get_wst()#

Gets the water storage threshold (wst).

Returns:

The water storage threshold, or None if not set.

Return type:

float or None

get_wstConditions()#

Gets the water storage threshold conditions.

Returns:

The water storage threshold conditions, or None if not set.

Return type:

str or None

mandatories = []#
name = 'waterstoragecapacity'#
classmethod parse(data_string)#

Parses the data_string to create a WaterStorageCapacityAdditionalInformation instance.

Parameters:

data_string (str) – A string containing water storage capacity data in the format ‘wst - wstConditions - maximumWaterstoragecapacity’.

Returns:

WaterStorageCapacityAdditionalInformation instance.

Return type:

WaterStorageCapacityAdditionalInformation

set_maximumWaterstoragecapacity(value)#

Sets the maximum water storage capacity.

Parameters:

value (float) – The maximum water storage capacity, measured in g water/100g dry soil.

set_wst(value)#

Sets the water hold capacity.

Parameters:

value (float) – The water hold capacity, measured in g water/100g dry soil.

set_wstConditions(value)#

Sets the water storage threshold conditions.

Parameters:

value (str) – The water storage threshold conditions.

class enviPath_python.objects.enviPathObject(requester, *args, **kwargs)#

Bases: ABC

Base class for an enviPath object.

delete()#

Deletes the object denoted by the internally maintained field id.

Returns:

None

get_description()#

Get the description of the envipath object

Returns:

The description of the object

get_id()#

Get the id of the envipath object

Returns:

The id of the object

get_json()#

Returns the objects plain JSON fetched from the instance.

Returns:

A JSON object returned by the API.

get_name()#

Get the name of the envipath object

Returns:

The name of the object

get_type()#

Gets the class name as string.

Returns:

The class name as string. E.g. ‘Package’

refresh()#

enviPath_python.utils module#

class enviPath_python.utils.NonPersistent(eP: enviPath)#

Bases: object

class enviPath(base_url, proxies=None, adapter=None, new_api=False)#

Bases: object

Object representing enviPath functionality.

create_package(group: Group | None = None, name: str | None = None, description: str | None = None) Package#

Function that creates an enviPath package

Parameters:
  • group (enviPath_python.objects.Group) – The group that the package will belong to

  • name (str) – The name for the package

  • description (str) – The description for the package

Returns:

The created package

Return type:

enviPath_python.objects.Package

get_base_url() str#

Method to return the base url of the enviPath object

Returns:

The base URL

Return type:

str

get_compound(compound_id) Compound#

Returns the compound matching with id compound_id

Parameters:

compound_id (str) – The identifier of the compound

Returns:

The retrieved compound with matching compound id

Return type:

enviPath_python.objects.Compound

get_compounds() List[Compound]#

Gets all compounds the logged in user has at least read permissions on.

Returns:

List of Compound objects.

Return type:

List

get_groups()#

Gets all groups the logged in user has at least read permissions on.

Returns:

List of Group objects.

Return type:

List

get_package(package_id: str) Package#

Gets the specified package

Parameters:

package_id (str) – The identifier of the package

Returns:

A package object

Return type:

enviPath_python.objects.Package

get_packages() List[Package]#

Gets all packages the logged in user has at least read permissions on.

Returns:

List of Package objects.

Return type:

List

get_pathway(pathway_id) Pathway#

Get the pathway with identifier pathway_id

Parameters:

pathway_id (str) – The identifier of the pathway

Returns:

The pathway with matching id

Return type:

enviPath_python.objects.Pathway

get_pathways() List[Pathway]#

Gets all pathways the logged in user has at least read permissions on.

Returns:

List of Pathway objects.

Return type:

List

get_reaction(reaction_id) Reaction#

Get the reaction with reaction identifier reaction_id

Parameters:

reaction_id (str) – The identifier for the reaction

Returns:

The reaction with matching id

Return type:

enviPath_python.objects.Reaction

get_reactions() List[Reaction]#

Gets all reactions the logged in user has at least read permissions on.

Returns:

List of Reaction objects.

Return type:

List

get_rule(rule_id) Rule#

Get the rule with identifier rule_id

Parameters:

rule_id (str) – The identifier of the rule

Returns:

The rule with the corresponding id equivalent to rule_id

Return type:

enviPath_python.objects.Rule

get_rules() List[Rule]#

Gets all rules the logged in user has at least read permissions on.

Returns:

List of Reaction objects.

Return type:

List

get_scenario(scenario_id) Scenario#

Get the pathway with identifier scenario_id

Parameters:

scenario_id (str) – The identifier of the scenario

Returns:

The scenario with matching id

Return type:

enviPath_python.objects.Scenario

get_scenarios() List[Scenario]#

Gets all scenarios the logged in user has at least read permissions on.

Returns:

List of Scenario objects.

Return type:

List

get_setting(setting_id) Setting#

Get the setting with identifier setting_id

Parameters:

setting_id (str) – The identifier of the setting

Returns:

The setting with matching id

Return type:

enviPath_python.objects.Setting

get_settings() List[Setting]#

Gets all settings the logged in user has at least read permissions on.

Returns:

List of Settings objects.

get_users() List[User]#

Gets all users the logged in user has at least read permissions on.

Returns:

List of Settings objects.

Return type:

List

login(username, password) None#

Performs login.

Parameters:
  • username (str) – The username.

  • password (str) – The corresponding password.

logout() None#

Performs logout.

Returns:

None

search(term: str, packages: Package | List[Package], method: str = 'defaultSmiles')#

Function designed to perform a search on an enviPath session.

Parameters:
  • term – the term with which the search wants to be performed

  • packages – the packages where the search wants to be performed

  • method – the method to be used from the list following [“text”, “inchikey”, “defaultSmiles”, “canonicalSmiles”, “exactSmiles”]

Returns:

a dictionary of object identifiers

who_am_i() User#

Method to get the currently logged in user.

Returns:

User object.

Return type:

enviPath_python.objects.User

predict(setting: Setting, smiles: str) dict#

Performs a pathway prediction for a given smiles and settings

Parameters:
  • setting (enviPath_python.objects.Setting) – a Setting object to be used for the pathway prediction

  • smiles (str) – the string of the molecule whose pathway wants to be predicted

Returns: