Component Editions Documentation
Applicability: Cranium, Synapse (core version 0326+)

The Component Editions of Cranium and Synapse (the servers) enable software applications (the clients) to access and utilize some of the functions they contain. For example, some of these functions enable client applications to retrieve physical property data, estimate physical properties, generate xy and triangular graphs, retrieve reference inforamtion, generate citations, and retrieve molecular structure files.

The Component Editions use Microsoft's COM (Component Object Model) technology to provide access to five MKS Library Objects:

application - request - entity - property - datum

The following sections describe each of these library objects and their associated functions.

Application Object
VBA

The application object is the top-level object containing several key functions for assigning source documents, setting output windows, and processing requests. The figure to the left shows code that creates an application object and calls its "Version" function. The result of executing this code is shown below.

C++

The application object is the top-level object containing several key functions for assigning source documents, setting output windows, and processing requests. The figure to the left shows code that creates an application object and calls its "Version" function. The result of executing this code is shown below.

C#

The application object is the top-level object containing several key functions for assigning source documents, setting output windows, and processing requests. The figure to the left shows code that creates an application object and calls its "Version" function. The result of executing this code is shown below.

The following list details the application object's commonly used functions:

  • assigns the name of the source knowledge base from which data and calculation results will be retrieved. The function returns 'true' or 'false' depending upon if the assignment was successful.
  • returns the pathname of the currently assigned source knowledge base.
  • creates and returns a new MKS Request object.
  • causes the application to process the entered request.
  • stores an error message within the application. Note that this error message may be replace by another message, automatically generated in subsequent code.
  • returns the error message currently stored within the application object. Note that this returned string may be an empty string.
  • assigns the window within which the Component Edition's dialogs will be displayed.
  • displays the application's units conversion dialog. This dialog enables you enter a value in one set of units and have it converted to another set of units. Note that a display window must be set using the SetAppWindow function before the units conversion dialog can be displayed.
  • returns information about the current application and its version.
Request Object
VBA

The request object is used to specify details about the values you wish the application to retrieve or calculate. A request's type (assigned with the SetType function explained below) determines what type of operation the application will perform. The code to the left is a VBA subroutine that creates a request for the names of all the estimation techniques contained within the source knowledge base that begin with the characters "Tc". (Note that 'GetKBDocPath' is a user-defined function that returns the pathname of the source knowledge base.) The figure below shows the output generated by the subroutine.

C++

The request object is used to specify details about the values you wish the application to retrieve or calculate. A request's type (assigned with the SetType function explained below) determines what type of operation the application will perform. The code to the left is a C++ function that creates a request for the names of all the estimation techniques contained within the source knowledge base that begin with the characters "Tc". (Note that 'GetKBDocPath' is a user-defined function that returns the pathname of the source knowledge base.) The figure below shows the output generated by the function.

C#

The request object is used to specify details about the values you wish the application to retrieve or calculate. A request's type (assigned with the SetType function explained below) determines what type of operation the application will perform. The code to the left is a C# function that creates a request for the names of all the estimation techniques contained within the source knowledge base that begin with the characters "Tc". (Note that 'GetKBDocPath' is a user-defined function that returns the pathname of the source knowledge base.) The figure below shows the output generated by the function.

The following list details the request object's commonly used functions:

  • (required) assigns the type of processing the application should perform, e.g., 'Get Entities' or 'Get Units'. Processing the 'Get Requests' request type returns a response containing all request types.
  • returns the request's assigned type.
  • creates an entity, adds the entity to the request's internal array of entities, and then returns the new entity object. The returned entity's attributes can then be assigned values.
  • returns the entity located at the given index within the request's internal array of entities. Indices are zero-based. This function returns 'null' if the index is less than zero or greater than the entity array's largest index.
  • returns the number of entities present within the request's internal entities array.
  • certain request types require additional arguments. This function adds an argument to the request and assigns it the input value. (Refer to the documentation on each request type below for details on required arguments.)
  • returns the value associated with the input argument name.
  • removes all arguments from the request.
  • returns a string contains the application's name and version information.
  • returns the error, if one is present, generated by the application during the processing of the request object.

Every request object must have a "Type" attribute. (Assigned by using the object's SetType function.) The available Type values are listed below:

  • Hello: a simple request that returns some basic information about the running Component Edition application. This request type is very useful for initial testing of a client application. (see below)
  • Get Request Types: returns all of the request types (i.e., the types described in this list) that can be currently processed by the Component Edition application. (see below)
  • Get Entity Types: the Component Edition application processes different entity types, e.g., chemicals, mixtures, techniques, references. An entity's type typically must be specified when requesting data or estimates. This request type returns all entity types that can be currently processed by the application. (see below)
  • Get Entities: returns the identifier, i.e., name, of each entity in the source knowledge base. An entity's identifier is required for requesting its physical property values. (see below)
  • Get Properties: returns all the properties handled by the Component Edition application. These properties are typically required when making additional requests for data and estimates. (see below)
  • Get Status Values: physical property values are categorized by their status type. For example, some values represent data values while others represent estimated values. A property's status value often must be specified when requesting data and estimates. This request type returns all status values processed by the Component Edition application. (see below)
  • Get Values: returns the physical property values for a given entity. This is probably the most commonly used request type. To make this request, you must typically specify an entity's type, an entity's identifier, a property name, and a status value. Valid values for these inputs can be obtained by making the other requests documented in this list. (see below)

Each of these request types is explained and illustrated in the sections below.

Request Object: Hello
VBA

The 'Hello' request is a simple request typically used to test connectivity with the Component Edition. The current date and time is formatted into a string and stored within a datum. The code to the right shows the creation of the application and a request of the Hello type. The output value is extracted from the first datum of the first property of the first entity of the request.

C++

The 'Hello' request is a simple request typically used to test connectivity with the Component Edition. The current date and time is formatted into a string and stored within a datum. The code to the right shows the creation of the application and a request of the Hello type. The output value is extracted from the first datum of the first property of the first entity of the request.

C#

The 'Hello' request is a simple request typically used to test connectivity with the Component Edition. The current date and time is formatted into a string and stored within a datum. The code to the right shows the creation of the application and a request of the Hello type. The output value is extracted from the first datum of the first property of the first entity of the request.

Request Object: Get Request Types
VBA

Every request must have a "Type" value. The 'Get Request Types' request returns all of the request types that can be currently processed by the Component Edition. Note that the response returns data for the '#Virtual Property' of the '#Virtual Entity'. These are just placeholders used to maintain the uniformity of the MKS object structure.

C++

Every request must have a "Type" value. The 'Get Request Types' request returns all of the request types that can be currently processed by the Component Edition. Note that the response returns data for the '#Virtual Property' of the '#Virtual Entity'. These are just placeholders used to maintain the uniformity of the MKS object structure.

C#

Every request must have a "Type" value. The 'Get Request Types' request returns all of the request types that can be currently processed by the Component Edition. Note that the response returns data for the '#Virtual Property' of the '#Virtual Entity'. These are just placeholders used to maintain the uniformity of the MKS object structure.

Request Object: Get Entity Types
VBA

Every input entity must have an "EntityType" value. The 'Get Entity Types' request returns all of the entity types that can be currently processed by the api. Note that the response returns data for the '#Virtual Property' of the '#Virtual Entity'. These are just placeholders used to maintain the uniformity of the MKS object structure.

C++

Every input entity must have an "EntityType" value. The 'Get Entity Types' request returns all of the entity types that can be currently processed by the api. Note that the response returns data for the '#Virtual Property' of the '#Virtual Entity'. These are just placeholders used to maintain the uniformity of the MKS object structure.

C#

Every input entity must have an "EntityType" value. The 'Get Entity Types' request returns all of the entity types that can be currently processed by the api. Note that the response returns data for the '#Virtual Property' of the '#Virtual Entity'. These are just placeholders used to maintain the uniformity of the MKS object structure.

Request Object: Get Entities
VBA

To retrieve physical property data and estimates from the Component Edition, you must make a request containing an entity's identifier. The 'Get Entities' request retrieves the identifiers (names) of all entities in the assigned source document. The request retrieves only entity identifiers for a single entity type. You must specify this entity type using the request's AddArgument function. (The list of entity types can be obtained by processing the Get Entity Types request.)

C++

To retrieve physical property data and estimates from the Component Edition, you must make a request containing an entity's identifier. The 'Get Entities' request retrieves the identifiers (names) of all entities in the assigned source document. The request retrieves only entity identifiers for a single entity type. You must specify this entity type using the request's AddArgument function. (The list of entity types can be obtained by processing the Get Entity Types request.)

C#

To retrieve physical property data and estimates from the Component Edition, you must make a request containing an entity's identifier. The 'Get Entities' request retrieves the identifiers (names) of all entities in the assigned source document. The request retrieves only entity identifiers for a single entity type. You must specify this entity type using the request's AddArgument function. (The list of entity types can be obtained by processing the Get Entity Types request.)

Request Object: Get Entities Type - Pattern Matching

To retrieve a chemical's data values, you must know the chemical's name. Unfortunately, chemicals often have more than one name. For example, 1-butanol is also often called n-butanol, n-butyl alcohol, or just butanol. Several attempts at creating unique names have been undertaken over the years by organizations such as Elsevier Publishing (beilstein numbers), the American Chemical Society (cas numbers), the European Union (ec numbers), and the Flavor Extract Manufacturers Association (fema numbers). Unfortunately, as this brief listing shows, there are many 'unique' names.

To address this issue of multiple identifiers, the api enables you to add qualifiers to the Get Entities request. These qualifiers are added as arguments of the request and thus take the form of an attribute-value pair.

The attributes that are allowed are listed here:

  • Beilstein Number
  • CAS Number
  • EC Number
  • Formula
  • Identifier
  • Synonym

The value of the attribute-value pair is a string that may contain more or more 'pattern-matching' characters. These characters are:

  • $ - the dollar sign will match zero or more characters in an input value. For example, the value "$butanol" will match 1-butanol, n-butanol, cyclobutanol, and several more names.
  • ? - the question mark will match one character in an input value. For example, the value "1-hex?ne" will match 1-hexene and 1-hexyne.

These pattern-matching characters can be combined and used multiple times in a value. For example, the value "$hex?ne" will match cyclohexane, 2-methyl-1-hexene, 3-methylhexane, and several more chemicals.

You may use more than one pattern-matching attribute pair. For example you might combine the pair "Identifier": "$but$" with "Synonym": "$alcohol$" to retrieve a list of butyl alcohols.

Request Object: Get Entities Type - Pattern Matching, Synonyms Example 1

The code shown to the right retrieves the identifiers of all chemicals that have a synonym which matches the value "MEK". Note it is possible that more than one chemical will have the same synonym.

VBA

The code shown to the right retrieves the identifiers of all chemicals that have a synonym which matches the value "MEK". Note it is possible that more than one chemical will have the same synonym.

C++

The code shown to the right retrieves the identifiers of all chemicals that have a synonym which matches the value "MEK". Note it is possible that more than one chemical will have the same synonym.

C#
Request Object: Get Entities Type - Pattern Matching, Synonyms Example 2

The code shown to the right retrieves the identifiers of all chemicals that have a synonym that matches "$2060". (This pattern would match 3-Methylbutyl butyrate, which has the synonym "FEMA Number: 2060".)

VBA

The code shown to the right retrieves the identifiers of all chemicals that have a synonym that matches "$2060". (This pattern would match 3-Methylbutyl butyrate, which has the synonym "FEMA Number: 2060".)

C++

The code shown to the right retrieves the identifiers of all chemicals that have a synonym that matches "$2060". (This pattern would match 3-Methylbutyl butyrate, which has the synonym "FEMA Number: 2060".)

C#
Request Object: Get Entities Type - Pattern Matching, Chemical Formula Example

The code to the right retrieves the identifier of chemicals whose chemical formula contains carbon, nitrogen, and oxygen, i.e., 'C$N$O$'. Note that pattern matching chemical formula is not the best method for finding matching chemical structures. That is because the pattern "C$" will match C8 as well as Ca, Cl, Co, or Cu.

VBA

The code to the right retrieves the identifier of chemicals whose chemical formula contains carbon, nitrogen, and oxygen, i.e., 'C$N$O$'. Note that pattern matching chemical formula is not the best method for finding matching chemical structures. That is because the pattern "C$" will match C8 as well as Ca, Cl, Co, or Cu.

C++

The code to the right retrieves the identifier of chemicals whose chemical formula contains carbon, nitrogen, and oxygen, i.e., 'C$N$O$'. Note that pattern matching chemical formula is not the best method for finding matching chemical structures. That is because the pattern "C$" will match C8 as well as Ca, Cl, Co, or Cu.

C#
Request Object: Get Entities Type - Pattern Matching, Combinations Example

More than one pattern-matching attribute-value pair can be added to a request. The example code to the right retrieves combines the pair "Identifier": "$but$" with the pair "Synonym": "$alcohol$" to retrieve a list of butyl alcohols.

VBA

More than one pattern-matching attribute-value pair can be added to a request. The example code to the right retrieves combines the pair "Identifier": "$but$" with the pair "Synonym": "$alcohol$" to retrieve a list of butyl alcohols.

C++

More than one pattern-matching attribute-value pair can be added to a request. The example code to the right retrieves combines the pair "Identifier": "$but$" with the pair "Synonym": "$alcohol$" to retrieve a list of butyl alcohols.

C#
Request Object: Get Properties
To retrieve physical property data and estimates from the Component Edition, you must make a request containing one or more properties. The 'Get Properties' request retrieves the names of all properties the Component Edition can currently process. Because certain properties, e.g., synonym, cannot be estimated, the Component Edition maintains two property lists: one for data properties and one for estimates properties. These two lists are maintained for each entity type. The request retrieves only property names for a single entity type and property type. This property type argument can be either 'Data' or 'Estimates'. (Note that the list of entity types can be obtained by processing the Get Entity Types request.)
Request Object: Get Properties - Chemical Example
VBA

The code to the left retrieves the names of all chemical properties that are of the 'Data' property type. Note that the request's AddAttribute function is used to specify the entity type and property type. A similar request would be used to retrieve the names of all chemical properties that are of the "Estimates" property type.

C++

The code to the left retrieves the names of all chemical properties that are of the 'Data' property type. Note that the request's AddAttribute function is used to specify the entity type and property type. A similar request would be used to retrieve the names of all chemical properties that are of the "Estimates" property type.

C#

The code to the right retrieves the names of all chemical properties that are of the 'Data' property type. Note that the request's AddAttribute function is used to specify the entity type and property type.

Request Object: Get Status Values
There are often several values reported for a particular physical property value. For example, the boiling point of Acetone has been reported to be 56.0, 56.29, and 56.18 C. All of these values can be stored within an MKS Knowledge Base. Of these values, one has a status value of 'Active' and the other two are assigned a status value of 'Passive'. These status values are assigned when values are entered into a knowledge base and must be specified when requesting values from a knowledge base.
Four status values are commonly used by the Component Edition:
  • Active: Values with an Active status are values that can be considered recommended by MKS. Constant properties will have only a single Active datum.
  • Passive: Values with a Passive status are considered "good" but not the "best". Every property can have multiple Passive data.
  • Estimated: Values with an Estimated status are values that have been previously estimated and are already stored within the source knowledge base. Typically, these values were estimated using the Professional Edition of Cranium or Synapse before the source knowledge base was deployed for use with the Component Edition. Note the datum's reference is the name of the estimated technique used to generate the estimated value.
  • New Estimate: This status value instructs the Component Edition to generate a new physcial property estimate, even if one is already present in the source knowledge base. Note that the new estimate generated using this status value may be different than the estimated returned by the 'Estimated' status value. (This is becuase the estimate stored in the knowledge base, i.e., the value with the 'Estimated' status value, may have been estimated using a different estimation technique. Comparing the reference of this request's datum with that of the 'Estimated' status value request should show this difference.)
Request Object: Get Status Values
VBA

The code to the left retrieves the status values currently handled by the Component Edition.

C++

The code to the left retrieves the status values currently handled by the Component Edition.

C#

The code to the left retrieves the status values currently handled by the Component Edition.

Request Object: Get Units
For many request types, you must specify the units for input temperatures, pressures, and compositions. You may also specify that the data and estimates returned from a request be in certain units. The 'Get Units' request returns the units available for a specified property.
VBA

The code to the left retrieves all units currently available for the Liquid Density property. (Note that although this request requires an entity and one or more properties, not all of the entity attribute or property attributes need to be specified.)

C++

The code to the left retrieves all units currently available for the Liquid Density property. (Note that although this request requires an entity and one or more properties, not all of the entity attribute or property attributes need to be specified.)

C#

The code to the left retrieves all units currently available for the Liquid Density property. (Note that although this request requires an entity and one or more properties, not all of the entity attribute or property attributes need to be specified.)

Request Object: Get Values

The 'Get Values' request is probably the most commonly used request type. To make this request, you must typically specify an entity's type, an entity's identifier, a property name, and a status value. To generate new estimates, you may also have to specify one or more datum values containing values for temperature, pressure, and composition.

Conceptually, you can think of a Get Values request as a form. You first add information you know on the form. You then submit the form to the Component Edition. The Component Edition returns the form to you with the missing information, or much of it, filled in.

The following examples demonstrate various Get Values requests.

Request Object: Get Values - Chemical Example
VBA

The code to the left returns a data value and a newly estimated value for the boiling point of 1,2-Dichlorobenzene. Note that the only difference between the two property objects is their status value.

C++

The code to the left returns a data value and a newly estimated value for the boiling point of 1,2-Dichlorobenzene. Note that the only difference between the two property objects is their status value.

C#

The code to the left returns a data value and a newly estimated value for the boiling point of 1,2-Dichlorobenzene. Note that the only difference between the two property objects is their status value.

Request Object: Get Values - Mixture Example
VBA

The code to the left creates a new mixture and estimates the activity coefficients of component 1 at several compositions. Note that you must specify the names of the new mixture's components as datum objects within a 'Components' property object.

C++

The code to the left creates a new mixture and estimates the activity coefficients of component 1 at several compositions. Note that you must specify the names of the new mixture's components as datum objects within a 'Components' property object.

C#

The code to the left creates a new mixture and estimates the activity coefficients of component 1 at several compositions. Note that you must specify the names of the new mixture's components as datum objects within a 'Components' property object.

Request Object: Get Values - Structure Example
VBA

The Component Edition can receive chemical structure information in SMILES notation or MolFile format. The code to the left estimates several properties for OC(=O)CCCCCCCCCCC, which is the chemical structure of lauric acid. Note that the chemical's structure is given in the request object as an 'Active' status value datum and the properties to be estimated have status values of 'New Estimate'. This instructs the Component Edition to 'cache' the input, active data. See caching data values below for more details on this capability.

C++

The Component Edition can receive chemical structure information in SMILES notation or MolFile format. The code to the left estimates several properties for OC(=O)CCCCCCCCCCC, which is the chemical structure of lauric acid. Note that the chemical's structure is given in the request object as an 'Active' status value datum and the properties to be estimated have status values of 'New Estimate'. This instructs the Component Edition to 'cache' the input, active data. See caching data values below for more details on this capability.

C#

The Component Edition can receive chemical structure information in SMILES notation or MolFile format. The code to the left estimates several properties for OC(=O)CCCCCCCCCCC, which is the chemical structure of lauric acid. Note that the chemical's structure is given in the request object as an 'Active' status value datum and the properties to be estimated have status values of 'New Estimate'. This instructs the Component Edition to 'cache' the input, active data. See caching data values below for more details on this capability.

Entity Object

For many requests you will need to specify some information about one or more entities. For example, to request a chemical's critical pressure data value, you must specify the chemical's identifier attribute. To request a mixture's estimated liquid density, you must specify the mixture's identifier and its list of components attributes. The entity object is used to specify such information.

The following list details the entity object's commonly used functions:
  • creates and adds an MKS Property Object to the entity's array of property objects. The newly created object is returned.
  • returns the MKS Property Object at the indexed location in the entity's array of property objects. A value of 'null' is returned if the index is greater than the array's upper bound.
  • returns the number of property object in the entity's properties array.
  • returns the entity's assigned name.
  • assigns the input value to the entity's name attribute.
  • returns the entity's type, e.g., "Chemical" or "Technique".
  • assigns the input value to the entity's type attribute.
Property Object
For most Get Values requests you will need to specify some information about one or more properties. For example, to request a chemical's liquid density data values, you must specify the chemical entity and the liquid density property object. Specifically, the property object's name, status value, and component.
The following list details the property object's commonly used functions:
  • assigns the property's name. The Get Properties request can be used to retrieve a list of property names of a specific entity type and property type.
  • retrieve the property's assigned name.
  • assigns the status value of the property data being requested. See documentation on the Get Status Values request for an explanation of status values.
  • returns the property object's assigned status value.
  • certain physical properties of mixtures, e.g., the activity coefficient, fugacity coefficient, diffusion coefficient, and partial molar properties, are actually properties of the mixture's components. For example, a mixture containing chemical 1 and chemical 2 does not have an activity coefficient. Chemical 1 in the mixture 1 + 2 has an activity coefficient and chemical 2 in the mixture 1 + 2 activity coefficient.

    Thus to retrieve data and estimates for these mixture physical properties, you must use this function to set the component's index. Note that the component index is 'zero-based', e.g., in a binary mixture the component indices are 0 and 1.

    Only a few mixture properties are 'component dependent'. Thus, for most properties you will simply assign a value of 0.

  • creates an MKS Datum object, adds the datum to the property's internal array of data, and then returns the new datum object.
  • returns the datum located at the given index within the property's internal array of data. Indices are zero-based. This function returns 'null' if the index is less than zero or greater than the data array's largest index.
  • returns the number of datum objects present in the property's internal array of data.
  • typically, the Component Edition performs estimations in an 'automatic mode'. In this mode, the Component Edition examines input information, e.g., temperatures, pressures, and chemical structure, and then selects the best estimation technique. You can use this function to specify the name of the estimation technique that should be used instead of the one selected by using the automatic process.
  • returns the name of the assigned manual estimation technique.
  • returns the standard units for the property. Estimated values are returned in standard units.
Property Object: Status Example
VBA

The code to the left returns property data having various status values for Benzene. Note that although a constant property, like the critical temperature, will have only one 'active' value, it may have several 'passive' values.

C++

The code to the left returns property data having various status values for Benzene. Note that although a constant property, like the critical temperature, will have only one 'active' value, it may have several 'passive' values.

C#

The code to the left returns property data having various status values for Benzene. Note that although a constant property, like the critical temperature, will have only one 'active' value, it may have several 'passive' values.

Property Object: Manual Technique Example
VBA

The code to the left returns the critical temperature of Butyraldehyde: a literature value and estimates generated by an automatically selected technique and several manually selected techniques. (The automatic mode estimate is the property object without a manual technique entry.)

C++

The code to the left returns the critical temperature of Butyraldehyde: a literature value and estimates generated by an automatically selected technique and several manually selected techniques. (The automatic mode estimate is the property object without a manual technique entry.)

C#

The code to the left returns the critical temperature of Butyraldehyde: a literature value and estimates generated by an automatically selected technique and several manually selected techniques. (The automatic mode estimate is the property object without a manual technique entry.)

Data Caching

When the Component Edition processes a 'Get Values' request it conceptually processes the request twice. During the first processing, the Component Edition temporarily stores all Active data found in the request object into the source knowledge base. For example, if the request has Active boiling point data, these values will be temporarily stored, or cached, in the source knowledge base. During the second processing, all other data and estimated will be retrieved.

This two step processing enables you to add values to the knowledge base, albeit temporarily, which can then be used in all subsequent estimations. The examples below illustrate the advantage of this approach. They both estimate the vapor pressure at 85C of 2-Hexanol. The literature value for this property is 11.466 kPa.

Data Caching: Cached Example
VBA

The code to the left create two entities: A) entity A is assigned a value for its molecular structure using a SMILES string; B) entity B is assigned a value for its molecular structure using a SMILES string AND a literature value for its normal boiling point.

The vapor pressure at 85C is estimated for both entity A and entity B. The Ambrose + Walton Method is used for both estimations. This technique depends upon the normal boiling point. Thus, the boiling point for entity A is estimated while the boiling point for entity B is taken from the cached value.

The estimated vapor pressure for entity B, the chemical with the cached (known) boiling point, is much closer to the literature value. You can use data caching in this manner to take advantage of whatever data you have on your unknown chemicals and mixtures.

C++

The code to the left create two entities: A) entity A is assigned a value for its molecular structure using a SMILES string; B) entity B is assigned a value for its molecular structure using a SMILES string AND a literature value for its normal boiling point.

The vapor pressure at 85C is estimated for both entity A and entity B. The Ambrose + Walton Method is used for both estimations. This technique depends upon the normal boiling point. Thus, the boiling point for entity A is estimated while the boiling point for entity B is taken from the cached value.

The estimated vapor pressure for entity B, the chemical with the cached (known) boiling point, is much closer to the literature value. You can use data caching in this manner to take advantage of whatever data you have on your unknown chemicals and mixtures.

C#

The code to the left create two entities: A) entity A is assigned a value for its molecular structure using a SMILES string; B) entity B is assigned a value for its molecular structure using a SMILES string AND a literature value for its normal boiling point.

The vapor pressure at 85C is estimated for both entity A and entity B. The Ambrose + Walton Method is used for both estimations. This technique depends upon the normal boiling point. Thus, the boiling point for entity A is estimated while the boiling point for entity B is taken from the cached value.

The estimated vapor pressure for entity B, the chemical with the cached (known) boiling point, is much closer to the literature value. You can use data caching in this manner to take advantage of whatever data you have on your unknown chemicals and mixtures.

Datum Object
The Datum is the basic value-containing object used to exchange information with the Component Edition. Although a Datum object has many functions, typically only a small subset are applicable in a particular usage context.
The following list details the datum object's commonly used functions:
  • returns the value of the number stored within the datum. Use the GetDValueUnits function to retrieve the units of this returned value. If no value is present, this function returns the value -99999 and sets the datum's error string to an error message. You may also use the HasDValue function to determine if a value is present.
  • stores a numeric value within the datum. If you use this function to assign a value, you must also use the SetDValueUnits function to assign the value's units, unless the datum's containing property is dimensionless.
  • returns 'true' is this datum has an assigned numeric value or 'false' if it does not.
  • retrieves the value's accuracy (a positive number). Note that not every datum has an accuracy value. If no value is present, this function returns the value -99999 and sets the datum's error string to an error message. Is is thus important to check either the returned value or the datum's error, via the GetError function, to ensure a valid accuracy was returned.
  • returns the units in which the datum's value and value accuracy are given.
  • assigns the units for the datum's numeric value. You can perform a 'Get Units' request to retrieve a list of applicable units for the datum's containing property.
  • datum's are often used to store string values. This function returns the value of the string stored within the datum.
  • stores a string value within the datum.
  • returns the datum's temperature value (a numeric value). Use the GetTemperatureUnits function to retrieve the units of this returned temperature value.
  • assigns the datum's temperature at which the value was or will be determined. If you use this function to assign a temperature value, then you must also use the SetTemperatureUnits function assign a value for the temperature's units.
  • returns 'true' is this datum has an assigned temperature value or 'false' if it does not.
  • retrieves the temperature value's accuracy (a positive number). Note that not every datum has a temperature accuracy value. If no value is present, this function returns the value -99999 and sets the datum's error string to an error message. Is is thus important to check either the returned value or the datum's error, via the GetError function, to ensure a valid accuracy was returned.
  • returns the units in which the datum's temperature and temperature accuracy are given.
  • assigns the units for the datum's temperature value. You can perform a 'Get Units' request to retrieve a list of applicable units for temperature values.
  • returns the datum's pressure value (a numeric value). Use the GetPressureUnits function to retrieve the units of this returned pressure value.
  • assigns the datum's pressure at which the value was or will be determined. If you use this function to assign a pressure value, then you must also use the SetPressureUnits function assign a value for the pressure's units.
  • returns 'true' is this datum has an assigned pressure value or 'false' if it does not.
  • retrieves the pressure value's accuracy (a positive number). Note that not every datum has a pressure accuracy value. If no value is present, this function returns the value -99999 and sets the datum's error string to an error message. Is is thus important to check either the returned value or the datum's error, via the GetError function, to ensure a valid accuracy was returned.
  • returns the units in which the datum's pressure and pressure accuracy are given.
  • assigns the units for the datum's pressure value and accuracy. You can perform a 'Get Units' request to retrieve a list of applicable units for pressure values.
  • returns the composition (a non-negative number) of the indexed component in a mixture. Use the GetXUnits function to retrieve the units of this returned composition value.
  • assigns the datum's composition of the indexed component. If you use this function to assign a composition value, then you must also use the SetXUnits function assign a value for the composition's units.
  • returns 'true' is this datum has an assigned value for the indexed composition or 'false' if it does not.
  • retrieves the accuracy (a positive number) of the indexed composition value. Note that not every datum has a composition accuracy value for every component. If no value is present, this function returns the value -99999 and sets the datum's error string to an error message. Is is thus important to check either the returned value or the datum's error, via the GetError function, to ensure a valid accuracy was returned.
  • returns the units in which the datum's composition values and accuracies are given. Although a datum may have several composition values, all values are processed using the units assigned by this function.
  • assigns the units for the datum's composition and composition accuracy values. You can perform a 'Get Units' request to retrieve a list of applicable units for composition values.
  • returns the name of the source of the datum's value. This source is typically a reference's identifier or a technique's identifier.
  • assigns the name of the source of the datum's value. This source is typically a reference's identifier or a technique's identifier.
  • returns additional information stored within the datum typically regarding the datum's value.
  • assigns additional information about the datum. This information often documents the date and time of entry and details about the datum's value measurement or calculation.
  • converts this datum's numeric value and accuracy from its current units into the input units. This function also assigns the datum's value units attribute to the new units. Note that the units conversion of datum's value may require a value for the molecular weight of the datum's chemical or the molecular weight of each of the datum's mixture components. The conversion will fail if a molecular weight is needed and the application cannot retrieve or calculate such a value.
  • converts this datum's temperature value and accuracy from its current units into the input units. This function also assigns the datum's temperature units attribute to the new units.
  • converts this datum's pressure value and accuracy from its current units into the input units. This function also assigns the datum's pressure units attribute to the new units.
  • converts this datum's composition values and accuracies from their current units into the input units. This function also assigns the datum's composition units attribute to the new units. Note that the units conversion of datum's composition may require a value for the molecular weight of the datum's chemical or the molecular weight of each of the datum's mixture components. The conversion will fail if a molecular weight is needed and the application cannot retrieve or calculate such a value.
  • returns the error message, if any, assigned by the application during the processing of this datum.
Datum Object: Units Conversion Example
When the Component Edition retrieves physical property data, it returns those data in their original units, i.e., the units in which they were reported in their source reference. For example, if you retrieve liquid density data for 1,1,1-Trichloroethane, some data will have the temperature in 'C' and the value in 'g/cm3' while other data will have the temperature in 'K' and the value in 'kg/m3'.
When the Component Edition generates physical property estimates, these values are returned in 'standard units'. These are just units selected for each physical property used for internal Component Edition calculations.
If you wish to have physical property values returned in other units, you can specify these desired units in the property object. The Component Edition will then automatically perform units conversion before the values are returned. (Note that certain units conversions require knowledge of a chemical's or mixture component's molecular weight, e.g., converting g/cm3 to g-mol/cm3. The Component Edition will automatically retrieve or estimate the required molecular weight when needed. However, there can be instances in which the molecular weight cannot be obtained. In these cases the returned values will have a comment indicating a 'units conversion error' occurred. This error can be corrected by specifying a molecular weight or requesting data be returned in other units which do not require a mass-molar units conversion.)
The attributes that specify the units in which physical property values should be returned are detailed in the following list. Note that you can use a Units Request to obtain the list of units available for any particular physical property.
VBA

The code to the left creates a request that returns liquid density data for the mixture '1‑Butanol + 1‑Hexene'. Each returned datum contains a value, a temperature, a pressure, and compositions all in their original units.

The code then displays values for the first datum in original units and after being converted into different units.

C++

The code to the left creates a request that returns liquid density data for the mixture '1‑Butanol + 1‑Hexene'. Each returned datum contains a value, a temperature, a pressure, and compositions all in their original units.

The code then displays values for the first datum in original units and after being converted into different units.

C#

The code to the left creates a request that returns liquid density data for the mixture '1‑Butanol + 1‑Hexene'. Each returned datum contains a value, a temperature, a pressure, and compositions all in their original units.

The code then displays values for the first datum in original units and after being converted into different units.

Contact Us
Please contact us if you have any questions about the Component Edition of Cranium or Synapse, have questions about using the Component Edition's functions within your own code, or have any other questions about physical properties.
Related Documentation
Topic Description
Getting Started using Cranium provides a quick tour of Cranium's capabilities including physical property estimation and a discussion of structure editing.
Getting Started using Synapse provides a quick tour of Synapse's capabilities including examples of chemical product design.