public class RCSBLigandsFactory extends Object
RCSBLigands
from ligandInfo
XML files. The factory methods
will return null if the data was not found (rather than throwing an exception); client code should test for this.
This is for consistency: if the factory could not read some part (corresponding to a field in a class in
rcsb.descriptions
) of the XML file, either because it was blank or contained an error that could not be
safely ignored, that field will simply be null. This holds even for numerical values. On some parse errors, the error
will additionally be printed to standard error.
Example usage:
RCSBLigands ligands = RCSBLigandsFactory.getFromPdbIds("1w0p"); List<RCSBLigand> list = ligands.getLigands(); System.out.println(list.get(0).getFormula()); // prints "CA 2" System.out.println(list.get(1).getFormula()); // prints "C11 H19 N O9"
Constructor and Description |
---|
RCSBLigandsFactory() |
Modifier and Type | Method and Description |
---|---|
static RCSBLigand |
getFromHeteroAtomId(InputStream stream) |
static RCSBLigand |
getFromHeteroAtomId(String heteroAtomId) |
static List<RCSBLigand> |
getFromHeteroAtomIds(InputStream stream) |
static List<RCSBLigand> |
getFromHeteroAtomIds(List<String> heteroAtomIds) |
static List<RCSBLigand> |
getFromHeteroAtomIds(String... heteroAtomIds) |
static RCSBLigands |
getFromPdbId(InputStream stream) |
static RCSBLigands |
getFromPdbId(String pdbId) |
static List<RCSBLigands> |
getFromPdbIds(InputStream stream) |
static List<RCSBLigands> |
getFromPdbIds(List<String> pdbIds) |
static List<RCSBLigands> |
getFromPdbIds(String... pdbIds) |
static RCSBLigands |
getFromPdbIds(String pdbId) |
public RCSBLigandsFactory()
public static RCSBLigand getFromHeteroAtomId(InputStream stream)
RCSBLigands
from the XML file loaded as stream
. Prefer calling
getFromHeteroAtomId(String)
if you want data directly from RCSB's RESTful service.RCSBDescriptionFactory.get(String)
public static RCSBLigand getFromHeteroAtomId(String heteroAtomId)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeHet?chemicalID=hetid"
. This is the preferred factory method,
unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
public static List<RCSBLigand> getFromHeteroAtomIds(InputStream stream)
RCSBLigands
from the XML file loaded as stream
. Prefer calling
getFromHeteroAtomId(String)
if you want data directly from RCSB's RESTful service.RCSBDescriptionFactory.get(String)
public static List<RCSBLigand> getFromHeteroAtomIds(List<String> heteroAtomIds)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeHet?chemicalID=hetid"
. This is the preferred factory method,
unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
public static List<RCSBLigand> getFromHeteroAtomIds(String... heteroAtomIds)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeHet?chemicalID=hetid"
. This is the preferred factory method,
unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
public static RCSBLigands getFromPdbId(InputStream stream)
RCSBLigands
from the XML file loaded as stream
. Prefer calling
getFromPdbId(String)
if you want data directly from RCSB's RESTful service.RCSBDescriptionFactory.get(String)
public static RCSBLigands getFromPdbId(String pdbId)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeMol?structureId=pdbId"
. This is the preferred factory
method, unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
public static List<RCSBLigands> getFromPdbIds(InputStream stream)
RCSBLigands
from the XML file loaded as stream
. Prefer calling
getFromPdbId(String)
if you want data directly from RCSB's RESTful service.RCSBDescriptionFactory.get(String)
public static List<RCSBLigands> getFromPdbIds(List<String> pdbIds)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeMol?structureId=pdbId"
. This is the preferred factory
method, unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
public static RCSBLigands getFromPdbIds(String pdbId)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeMol?structureId=pdbId"
. This is the preferred factory
method, unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
public static List<RCSBLigands> getFromPdbIds(String... pdbIds)
RCSBLigands
from the XML file at
"http://www.pdb.org/pdb/rest/describeMol?structureId=pdbId"
. This is the preferred factory
method, unless a different URL or input source is required.RCSBDescriptionFactory.get(InputStream)
Copyright © 2000–2018 BioJava. All rights reserved.