Constructor and Description |
---|
MoleculesResource() |
Modifier and Type | Method and Description |
---|---|
MoleculeInfo |
findId(MolsRes set,
String id,
boolean smiles)
Find index of an ID.
|
MoleculeSetsInfo |
get()
Create JSON list of available molecule sets.
|
byte[] |
getCxBinFormat(MolsRes set,
int index,
boolean clean2d,
String format)
Get molecule in an arbitrary binary format.
|
String |
getCxFormat(MolsRes set,
int index,
boolean clean2d,
String format)
Get molecule in an arbitrary text based format.
|
String |
getId(MolsRes set,
int index)
Get ID of a single molecule.
|
MoleculeIds |
getIds(MolsRes set,
List<Integer> indices,
String missing)
Fetch IDs for multiple molecules.
|
MoleculeInfo |
getMolInfo(MolsRes set,
int index,
boolean smiles,
boolean props)
Create description of a single molecule.
|
byte[] |
getPng(MolsRes set,
int index,
int w,
int h,
String aromatize,
String hydrogenize)
Get molecule image in PNG format.
|
byte[] |
getPngOrPlaceholder(MolsRes set,
int index,
int w,
int h,
String aromatize,
String hydrogenize)
Get molecule image in PNG format or a placeholder image for absent molecules.
|
MoleculePropRange |
getPropertyOnIndexRange(MolsRes set,
String propname,
int start,
int maxcount,
String missing)
Fetch property values for a range of Molecule indices.
|
MoleculePropRange |
getPropertyOnIndexRangePOST(MolsRes set,
String propname,
int start,
int maxcount,
String missing)
Fetch property values for a range of Molecule indices - POST endpoint.
|
MoleculeProps |
getProps(MolsRes set,
List<Integer> indices,
List<String> props,
String missing)
Fetch multiple property values
|
Response |
getSdf(MolsRes set,
int index)
Get molecule in SDF format.
|
MoleculeSetInfo |
getSetInfo(String set)
Create description of a molecule set.
|
MoleculeProp |
getSingleProperty(MolsRes set,
int index,
String propname)
Get a single property value.
|
SizeInfoDto |
getSizeinfo(MolsRes set,
SizeInfoMethod method,
boolean dc)
Experimental endpoint to estimate allocated size.
|
Response |
getSmiles(MolsRes set,
int index)
Get molecule in Smiles format.
|
@GET @Produces(value="application/json") public MoleculeSetsInfo get()
@Path(value="{set}") @GET @Produces(value="application/json") public MoleculeSetInfo getSetInfo(@PathParam(value="set") String set)
set
- Set name@GET @Path(value="{set}/find-id") @Produces(value="application/json") public MoleculeInfo findId(@PathParam(value="set") MolsRes set, @QueryParam(value="id") String id, @QueryParam(value="smiles") @DefaultValue(value="true") boolean smiles)
WuiNotFoundException
will result in a "Not Found (404)" response status.set
- Set nameid
- Id to find. Note that it is not possible to look up absent
IDssmiles
- Lookup SMILES. If false
passed no SMILES will retrieved in the response. If true
is
passed but the given structure SMILES is absent then the response will not fail and no SMILES will be returned.WuiNotFoundException
- when given set or id is not found. In case of absent SMILES the response objects
MolsRes.MoleculeInfo#smiles
will be null
.@POST @Path(value="{set}/get-multiple-props") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/json") public MoleculeProps getProps(@PathParam(value="set") MolsRes set, @FormParam(value="indices[]") List<Integer> indices, @FormParam(value="props[]") List<String> props, @FormParam(value="missing") @DefaultValue(value="????") String missing)
set
- Set nameindices
- Indices for which the stored properties are requestedprops
- Properties requested. When no property specified all properties are returnedmissing
- Value to use for missing property values@GET @Path(value="{set}/props/{propname}/get-properties-on-index-range") @Produces(value="application/json") public MoleculePropRange getPropertyOnIndexRange(@PathParam(value="set") MolsRes set, @PathParam(value="propname") String propname, @QueryParam(value="start") @DefaultValue(value="0") int start, @QueryParam(value="maxcount") @DefaultValue(value="2147483647") int maxcount, @QueryParam(value="missing") @DefaultValue(value="????") String missing)
set
- Set namepropname
- Property namestart
- Index of first structuremaxcount
- Maximal structure countmissing
- Value to use for missing values@POST @Path(value="{set}/props/{propname}/get-properties-on-index-range") @Produces(value="application/json") public MoleculePropRange getPropertyOnIndexRangePOST(@PathParam(value="set") MolsRes set, @PathParam(value="propname") String propname, @FormParam(value="start") @DefaultValue(value="0") int start, @FormParam(value="maxcount") @DefaultValue(value="2147483647") int maxcount, @FormParam(value="missing") @DefaultValue(value="????") String missing)
set
- Set namepropname
- Property namestart
- Index of first structuremaxcount
- Maximal structure countmissing
- Value to use for missing values@POST @Path(value="{set}/get-multiple-ids") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/json") public MoleculeIds getIds(@PathParam(value="set") MolsRes set, @FormParam(value="indices[]") List<Integer> indices, @FormParam(value="missing") @DefaultValue(value="????") String missing)
set
- Set nameindices
- Indices for which the stored IDs are requestedmissing
- Value to use for missing structures@GET @Path(value="{set}/{index}") @Produces(value="application/json") public MoleculeInfo getMolInfo(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index, @QueryParam(value="smiles") @DefaultValue(value="true") boolean smiles, @QueryParam(value="props") @DefaultValue(value="true") boolean props)
set
- Set nameindex
- Molecule index in the setsmiles
- Lookup SMILES. If false
passed no SMILES will retrieved in the responseprops
- Include additional properties@GET @Path(value="{set}/{index}/props/{propname}") @Produces(value="application/json") public MoleculeProp getSingleProperty(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index, @PathParam(value="propname") String propname)
set
- Set nameindex
- Molecule index in the setpropname
- Name of additional property@GET @Path(value="{set}/{index}/id") @Produces(value="text/plain") public String getId(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index)
set
- Set nameindex
- Molecule index in the set????
when ID is absent@GET @Path(value="{set}/{index}/smiles") @Produces(value="chemical/x-daylight-smiles") public Response getSmiles(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index)
set
- Set nameindex
- Molecule index in the set@GET @Path(value="{set}/{index}/sdf") @Produces(value="chemical/x-mdl-sdfile") public Response getSdf(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index) throws IOException
set
- Set nameindex
- Molecule index in the setIOException
- Propagated from MolExporter
@GET @Path(value="{set}/{index}/png") @Produces(value="image/png") public byte[] getPng(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index, @QueryParam(value="w") @DefaultValue(value="100") int w, @QueryParam(value="h") @DefaultValue(value="100") int h, @QueryParam(value="aromatize") @DefaultValue(value="source") String aromatize, @QueryParam(value="hydrogenize") @DefaultValue(value="source") String hydrogenize) throws IOException, WuiNotFoundException
set
- Set nameindex
- Molecule index in the setw
- Image width in pixelsh
- Image height in pixelsaromatize
- Aromatize options, use source
, aromatize
or dearomatize
hydrogenize
- Hydrogenize options. use source
, hydrogenize
or dehydrogenize
IOException
- Propagated from MolExporter
WuiNotFoundException
- When molecule is absent@GET @Path(value="{set}/{index}/png-or-placeholder") @Produces(value="image/png") public byte[] getPngOrPlaceholder(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index, @QueryParam(value="w") @DefaultValue(value="100") int w, @QueryParam(value="h") @DefaultValue(value="100") int h, @QueryParam(value="aromatize") @DefaultValue(value="source") String aromatize, @QueryParam(value="hydrogenize") @DefaultValue(value="source") String hydrogenize) throws IOException, WuiNotFoundException
set
- Set nameindex
- Molecule index in the setw
- Image width in pixelsh
- Image height in pixelsaromatize
- Aromatize options, use source
, aromatize
or dearomatize
hydrogenize
- Hydrogenize options. use source
, hydrogenize
or dehydrogenize
IOException
- Propagated from MolExporter
WuiNotFoundException
@GET @Path(value="{set}/{index}/cxformat") @Produces(value="text/plain") public String getCxFormat(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index, @QueryParam(value="clean2d") @DefaultValue(value="false") boolean clean2d, @QueryParam(value="f") String format) throws IOException
set
- Set nameindex
- Molecule index in the setclean2d
- Clean2D structureformat
- Format string parameter to pass to
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
IOException
- Propagated from MolExporter
@GET @Path(value="{set}/{index}/cxbinformat") @Produces(value="application/octet-stream") public byte[] getCxBinFormat(@PathParam(value="set") MolsRes set, @PathParam(value="index") int index, @QueryParam(value="clean2d") @DefaultValue(value="false") boolean clean2d, @QueryParam(value="f") String format) throws IOException
set
- Set nameindex
- Molecule index in the setclean2d
- Clean2D structureformat
- Format string parameter to pass to
MolExporter.exportToBinFormat(chemaxon.struc.Molecule, java.lang.String)
IOException
- Propagated from MolExporter
@Beta @GET @Produces(value="application/json") @Path(value="{set}/get-sizeinfo") public SizeInfoDto getSizeinfo(@PathParam(value="set") MolsRes set, @QueryParam(value="method") SizeInfoMethod method, @QueryParam(value="dc") @DefaultValue(value="false") boolean dc)
set
- Set namemethod
- Size info method to use.dc
- Duplicate check on the large storages.