Class CifStructureConverter
java.lang.Object
org.biojava.nbio.structure.io.cif.CifStructureConverter
Convert BioJava structures to CifFiles and vice versa.
- Since:
- 6.0.0
- Author:
- Sebastian Bittrich
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Structure
fromCifFile
(org.rcsb.cif.model.CifFile cifFile) Convert CifFile to Structure without any FileParsingParameters.static Structure
fromCifFile
(org.rcsb.cif.model.CifFile cifFile, FileParsingParameters parameters) Convert CifFile to Structure.static Structure
fromInputStream
(InputStream inputStream) Convert InputStream to Structure without any FileParsingParameters.static Structure
fromInputStream
(InputStream inputStream, FileParsingParameters parameters) Convert InputStream to Structure.static Structure
Read data from a file and convert to Structure without any FileParsingParameters.static Structure
fromPath
(Path path, FileParsingParameters parameters) Read data from a file and convert to Structure.static Structure
Get data from a URL and convert to Structure without any FileParsingParameters.static Structure
fromURL
(URL url, FileParsingParameters parameters) Get data from a URL and convert to Structure.static byte[]
Convert a structure to BCIF format.static void
toBinaryFile
(Structure structure, Path path) Write a structure to a BCIF file.static org.rcsb.cif.model.CifFile
Convert Chain to CifFilestatic org.rcsb.cif.model.CifFile
Convert Structure to CifFile.static String
Convert a chain to mmCIF format.static String
Convert a structure to mmCIF format.static void
toTextFile
(Structure structure, Path path) Write a structure to a CIF file.
-
Constructor Details
-
CifStructureConverter
public CifStructureConverter()
-
-
Method Details
-
fromPath
Read data from a file and convert to Structure without any FileParsingParameters.- Parameters:
path
- the source of information - can be gzipped or binary or text data- Returns:
- the target
- Throws:
IOException
-
fromPath
Read data from a file and convert to Structure.- Parameters:
path
- the source of information - can be gzipped or binary or text dataparameters
- parameters for parsing- Returns:
- the target
- Throws:
IOException
-
fromURL
Get data from a URL and convert to Structure without any FileParsingParameters.- Parameters:
url
- the source of information - can be gzipped or binary or text data- Returns:
- the target
- Throws:
IOException
- thrown when reading fails
-
fromURL
Get data from a URL and convert to Structure.- Parameters:
url
- the source of information - can be gzipped or binary or text dataparameters
- parameters for parsing- Returns:
- the target
- Throws:
IOException
- thrown when reading fails
-
fromInputStream
Convert InputStream to Structure without any FileParsingParameters.- Parameters:
inputStream
- the InputStream of information - can be gzipped or binary or text data- Returns:
- the target
- Throws:
IOException
- thrown when reading fails- See Also:
-
fromInputStream
public static Structure fromInputStream(InputStream inputStream, FileParsingParameters parameters) throws IOException Convert InputStream to Structure.- Parameters:
inputStream
- the InputStream of information - can be gzipped or binary or text dataparameters
- parameters for parsing- Returns:
- the target
- Throws:
IOException
- thrown when reading fails
-
fromCifFile
Convert CifFile to Structure without any FileParsingParameters.- Parameters:
cifFile
- the source- Returns:
- the target
- See Also:
-
fromCifFile
public static Structure fromCifFile(org.rcsb.cif.model.CifFile cifFile, FileParsingParameters parameters) Convert CifFile to Structure.- Parameters:
cifFile
- the sourceparameters
- parameters for parsing- Returns:
- the target
-
toTextFile
Write a structure to a CIF file.- Parameters:
structure
- the sourcepath
- where to write to- Throws:
IOException
- thrown when writing fails
-
toBinaryFile
Write a structure to a BCIF file.- Parameters:
structure
- the sourcepath
- where to write to- Throws:
IOException
- thrown when writing fails
-
toBinary
Convert a structure to BCIF format.- Parameters:
structure
- the source- Returns:
- the binary representation of the structure
-
toText
Convert a structure to mmCIF format.- Parameters:
structure
- the source- Returns:
- the mmCIF String representation of the structure
-
toText
Convert a chain to mmCIF format.- Parameters:
chain
- the source- Returns:
- the mmCIF String representation of the chain
-
toCifFile
Convert Structure to CifFile.- Parameters:
structure
- the source- Returns:
- the target
-
toCifFile
Convert Chain to CifFile- Parameters:
chain
- the source- Returns:
- the target
-