Package org.biojava.nbio.structure.rcsb
Class RCSBLigandsFactory
- java.lang.Object
-
- org.biojava.nbio.structure.rcsb.RCSBLigandsFactory
-
public class RCSBLigandsFactory extends java.lang.ObjectFetches information from RCSB's RESTful Web Service Interface. A factory forRCSBLigandsfromligandInfoXML 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 inrcsb.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"- Since:
- 3.0.6
- Author:
- dmyerstu
- See Also:
- RCSB RESTful
-
-
Constructor Summary
Constructors Constructor Description RCSBLigandsFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RCSBLigandgetFromHeteroAtomId(java.io.InputStream stream)static RCSBLigandgetFromHeteroAtomId(java.lang.String heteroAtomId)static java.util.List<RCSBLigand>getFromHeteroAtomIds(java.io.InputStream stream)static java.util.List<RCSBLigand>getFromHeteroAtomIds(java.lang.String... heteroAtomIds)static java.util.List<RCSBLigand>getFromHeteroAtomIds(java.util.List<java.lang.String> heteroAtomIds)static RCSBLigandsgetFromPdbId(java.io.InputStream stream)static RCSBLigandsgetFromPdbId(java.lang.String pdbId)static java.util.List<RCSBLigands>getFromPdbIds(java.io.InputStream stream)static RCSBLigandsgetFromPdbIds(java.lang.String pdbId)static java.util.List<RCSBLigands>getFromPdbIds(java.lang.String... pdbIds)static java.util.List<RCSBLigands>getFromPdbIds(java.util.List<java.lang.String> pdbIds)
-
-
-
Method Detail
-
getFromHeteroAtomId
public static RCSBLigand getFromHeteroAtomId(java.io.InputStream stream)
- Returns:
- A list of
RCSBLigandsfrom the XML file loaded asstream. Prefer callinggetFromHeteroAtomId(String)if you want data directly from RCSB's RESTful service. - See Also:
RCSBDescriptionFactory.get(String)
-
getFromHeteroAtomId
public static RCSBLigand getFromHeteroAtomId(java.lang.String heteroAtomId)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
getFromHeteroAtomIds
public static java.util.List<RCSBLigand> getFromHeteroAtomIds(java.io.InputStream stream)
- Returns:
- A list of
RCSBLigandsfrom the XML file loaded asstream. Prefer callinggetFromHeteroAtomId(String)if you want data directly from RCSB's RESTful service. - See Also:
RCSBDescriptionFactory.get(String)
-
getFromHeteroAtomIds
public static java.util.List<RCSBLigand> getFromHeteroAtomIds(java.util.List<java.lang.String> heteroAtomIds)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
getFromHeteroAtomIds
public static java.util.List<RCSBLigand> getFromHeteroAtomIds(java.lang.String... heteroAtomIds)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
getFromPdbId
public static RCSBLigands getFromPdbId(java.io.InputStream stream)
- Returns:
- An
RCSBLigandsfrom the XML file loaded asstream. Prefer callinggetFromPdbId(String)if you want data directly from RCSB's RESTful service. - See Also:
RCSBDescriptionFactory.get(String)
-
getFromPdbId
public static RCSBLigands getFromPdbId(java.lang.String pdbId)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
getFromPdbIds
public static java.util.List<RCSBLigands> getFromPdbIds(java.io.InputStream stream)
- Returns:
- An
RCSBLigandsfrom the XML file loaded asstream. Prefer callinggetFromPdbId(String)if you want data directly from RCSB's RESTful service. - See Also:
RCSBDescriptionFactory.get(String)
-
getFromPdbIds
public static java.util.List<RCSBLigands> getFromPdbIds(java.util.List<java.lang.String> pdbIds)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
getFromPdbIds
public static RCSBLigands getFromPdbIds(java.lang.String pdbId)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
getFromPdbIds
public static java.util.List<RCSBLigands> getFromPdbIds(java.lang.String... pdbIds)
- Returns:
- An
RCSBLigandsfrom 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. - See Also:
RCSBDescriptionFactory.get(InputStream)
-
-