$darkmode
DENOPTIM
denoptim.fitness.descriptors.SocketProvidedDescriptor Class Reference

Sends the request to produce a numerical descriptor to a defined socket and receives back the response. More...

Inheritance diagram for denoptim.fitness.descriptors.SocketProvidedDescriptor:
[legend]
Collaboration diagram for denoptim.fitness.descriptors.SocketProvidedDescriptor:
[legend]

Public Member Functions

 SocketProvidedDescriptor ()
 Constructor for a SocketProvidedDescriptor object. More...
 
DescriptorSpecification getSpecification ()
 Get the specification attribute of socket-based descriptor provider. More...
 
String[] getParameterNames ()
 Gets the parameterNames attribute of the TanimotoMolSimilarity object. More...
 
Object getParameterType (String name)
 
void setParameters (Object[] params) throws CDKException
 Set the parameters attributes. More...
 
Object[] getParameters ()
 
String[] getDescriptorNames ()
 
DescriptorValue calculate (IAtomContainer mol)
 
IDescriptorResult getDescriptorResultType ()
 
String getDictionaryTitle ()
 Gets the title of this descriptor as it should be in the dictionary.
Returns
the title
More...
 
String getDictionaryDefinition ()
 Get a string that describes the descriptor in detail.Might contain mathematical formulation.

See also
DescriptorEngine
Returns
the description of this descriptor, possibly containing equations that clarify how it is calculated.
More...
 
String[] getDictionaryClass ()
 Get the classification of this descriptor.A descriptor can belong to one or more classes simultaneously.

Returns
More...
 
String getDictionaryTitle ()
 Gets the title of this descriptor as it should be in the dictionary. More...
 
String getDictionaryDefinition ()
 Get a string that describes the descriptor in detail. More...
 
String[] getDictionaryClass ()
 Get the classification of this descriptor. More...
 

Static Public Attributes

static final String KEYJSONMEMBERSMILES = "SMILES"
 The key of the JSON member defining the SMILES of the candidate for which the socket server should produce descriptor. More...
 
static final String KEYJSONMEMBERSCORE = "SCORE"
 The key of the JSON member defining the score/s for the descriptor calculated. More...
 
static final String KEYJSONMEMBERERR = "ERROR"
 The key of the JSON member defining an error in the calculation of the score. More...
 

Private Attributes

final int version = 1
 Version identifier. More...
 
String hostname
 The name of the host or ID address used to communicate with the socket server. More...
 
Integer port
 The identifier of the port used to communicate with the socket server. More...
 

Static Private Attributes

static final String[] PARAMNAMES
 Name of the input parameters. More...
 
static final String[] NAMES = {"SocketProvidedDescriptor"}
 NAme of the descriptor produced by this class. More...
 

Detailed Description

Sends the request to produce a numerical descriptor to a defined socket and receives back the response.

JSON format is used for communicating information in both directions. This class follows this convention:

  • sends JSON string with member {@value KEYJSONMEMBERSMILES} containing the SMILES of the candidate.
  • expects to receive a JSON with either member {@value KEYJSONMEMBERSCORE} containing one descriptor score as a float (double), or {@value KEYJSONMEMBERERR} containing any error occurred on the server side.

Definition at line 64 of file SocketProvidedDescriptor.java.

Constructor & Destructor Documentation

◆ SocketProvidedDescriptor()

denoptim.fitness.descriptors.SocketProvidedDescriptor.SocketProvidedDescriptor ( )

Constructor for a SocketProvidedDescriptor object.

Definition at line 117 of file SocketProvidedDescriptor.java.

Member Function Documentation

◆ calculate()

◆ getDescriptorNames()

String[] denoptim.fitness.descriptors.SocketProvidedDescriptor.getDescriptorNames ( )

Definition at line 211 of file SocketProvidedDescriptor.java.

References denoptim.fitness.descriptors.SocketProvidedDescriptor.NAMES.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptor.calculate().

Here is the caller graph for this function:

◆ getDescriptorResultType()

IDescriptorResult denoptim.fitness.descriptors.SocketProvidedDescriptor.getDescriptorResultType ( )

Definition at line 356 of file SocketProvidedDescriptor.java.

◆ getDictionaryClass()

String[] denoptim.fitness.descriptors.SocketProvidedDescriptor.getDictionaryClass ( )

Get the classification of this descriptor.A descriptor can belong to one or more classes simultaneously.

Returns

Implements denoptim.fitness.IDenoptimDescriptor.

Definition at line 402 of file SocketProvidedDescriptor.java.

◆ getDictionaryDefinition()

String denoptim.fitness.descriptors.SocketProvidedDescriptor.getDictionaryDefinition ( )

Get a string that describes the descriptor in detail.Might contain mathematical formulation.

See also
DescriptorEngine
Returns
the description of this descriptor, possibly containing equations that clarify how it is calculated.

Implements denoptim.fitness.IDenoptimDescriptor.

Definition at line 374 of file SocketProvidedDescriptor.java.

References denoptim.fitness.descriptors.SocketProvidedDescriptor.KEYJSONMEMBERERR, denoptim.fitness.descriptors.SocketProvidedDescriptor.KEYJSONMEMBERSCORE, denoptim.fitness.descriptors.SocketProvidedDescriptor.KEYJSONMEMBERSMILES, and denoptim.fitness.descriptors.SocketProvidedDescriptor.PARAMNAMES.

◆ getDictionaryTitle()

String denoptim.fitness.descriptors.SocketProvidedDescriptor.getDictionaryTitle ( )

Gets the title of this descriptor as it should be in the dictionary.

Returns
the title

Implements denoptim.fitness.IDenoptimDescriptor.

Definition at line 365 of file SocketProvidedDescriptor.java.

◆ getParameterNames()

String[] denoptim.fitness.descriptors.SocketProvidedDescriptor.getParameterNames ( )

Gets the parameterNames attribute of the TanimotoMolSimilarity object.

Returns
the parameterNames value

Definition at line 144 of file SocketProvidedDescriptor.java.

References denoptim.fitness.descriptors.SocketProvidedDescriptor.PARAMNAMES.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptor.calculate().

Here is the caller graph for this function:

◆ getParameters()

Object[] denoptim.fitness.descriptors.SocketProvidedDescriptor.getParameters ( )

Definition at line 199 of file SocketProvidedDescriptor.java.

References denoptim.fitness.descriptors.SocketProvidedDescriptor.hostname, and denoptim.fitness.descriptors.SocketProvidedDescriptor.port.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptor.calculate().

Here is the caller graph for this function:

◆ getParameterType()

Object denoptim.fitness.descriptors.SocketProvidedDescriptor.getParameterType ( String  name)

◆ getSpecification()

DescriptorSpecification denoptim.fitness.descriptors.SocketProvidedDescriptor.getSpecification ( )

Get the specification attribute of socket-based descriptor provider.

Returns
the specification of this descriptor.

Definition at line 126 of file SocketProvidedDescriptor.java.

References denoptim.fitness.descriptors.SocketProvidedDescriptor.hostname, and denoptim.fitness.descriptors.SocketProvidedDescriptor.port.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptor.calculate().

Here is the caller graph for this function:

◆ setParameters()

void denoptim.fitness.descriptors.SocketProvidedDescriptor.setParameters ( Object[]  params) throws CDKException

Set the parameters attributes.

The descriptor takes two parameters: the host name and the port number.

Parameters
paramsthe array of parameters

Definition at line 173 of file SocketProvidedDescriptor.java.

References denoptim.fitness.descriptors.SocketProvidedDescriptor.hostname, and denoptim.fitness.descriptors.SocketProvidedDescriptor.port.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptorTest.setUpSertver().

Here is the caller graph for this function:

Member Data Documentation

◆ hostname

String denoptim.fitness.descriptors.SocketProvidedDescriptor.hostname
private

◆ KEYJSONMEMBERERR

final String denoptim.fitness.descriptors.SocketProvidedDescriptor.KEYJSONMEMBERERR = "ERROR"
static

◆ KEYJSONMEMBERSCORE

final String denoptim.fitness.descriptors.SocketProvidedDescriptor.KEYJSONMEMBERSCORE = "SCORE"
static

◆ KEYJSONMEMBERSMILES

final String denoptim.fitness.descriptors.SocketProvidedDescriptor.KEYJSONMEMBERSMILES = "SMILES"
static

The key of the JSON member defining the SMILES of the candidate for which the socket server should produce descriptor.

Definition at line 76 of file SocketProvidedDescriptor.java.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptor.calculate(), denoptim.fitness.descriptors.SocketProvidedDescriptor.getDictionaryDefinition(), and denoptim.fitness.descriptors.SocketProvidedDescriptorTest.RequestHandler.run().

◆ NAMES

final String [] denoptim.fitness.descriptors.SocketProvidedDescriptor.NAMES = {"SocketProvidedDescriptor"}
staticprivate

◆ PARAMNAMES

final String [] denoptim.fitness.descriptors.SocketProvidedDescriptor.PARAMNAMES
staticprivate

◆ port

◆ version

final int denoptim.fitness.descriptors.SocketProvidedDescriptor.version = 1
private

Version identifier.

Definition at line 70 of file SocketProvidedDescriptor.java.

Referenced by denoptim.fitness.descriptors.SocketProvidedDescriptor.calculate().


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