public class MMCIFFileTools
extends java.lang.Object
AbstractBean.
By default, all fields from the bean are taken as the CIF labels. Fields
may be omitted by annotating them as @IgnoreField.
The CIF label for a field may be changed (for instance, for fields that
are not valid Java identifiers) by defining a function
static Map| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MMCIF_DEFAULT_VALUE
The character to be printed out as a default value in mmCIF files, e.g.
|
static java.lang.String |
MMCIF_MISSING_VALUE
The character to be printed out in cases where a value is not assigned in mmCIF files
|
| Constructor and Description |
|---|
MMCIFFileTools() |
| Modifier and Type | Method and Description |
|---|---|
static AtomSite |
convertAtomToAtomSite(Atom a,
int model,
java.lang.String chainName,
java.lang.String chainId)
Converts an Atom object to an
AtomSite object. |
static AtomSite |
convertAtomToAtomSite(Atom a,
int model,
java.lang.String chainName,
java.lang.String chainId,
int atomId)
Converts an Atom object to an
AtomSite object. |
static java.util.List<AtomSite> |
convertChainToAtomSites(Chain c,
int model,
java.lang.String chainName,
java.lang.String chainId)
Converts a Chain into a List of
AtomSite objects |
static Cell |
convertCrystalCellToCell(CrystalCell c)
Converts a CrystalCell object to a
Cell object. |
static java.util.List<AtomSite> |
convertGroupToAtomSites(Group g,
int model,
java.lang.String chainName,
java.lang.String chainId)
Converts a Group into a List of
AtomSite objects. |
static Symmetry |
convertSpaceGroupToSymmetry(SpaceGroup sg)
Converts a SpaceGroup object to a
Symmetry object. |
static java.util.List<AtomSite> |
convertStructureToAtomSites(Structure s)
Converts a Structure into a List of
AtomSite objects |
static java.lang.String[] |
getFieldNames(java.lang.reflect.Field[] fields)
Gets the mmCIF record name for each field.
|
static java.lang.reflect.Field[] |
getFields(java.lang.Class<?> c)
Gets all fields for a particular class, filtering fields annotated
with
@IgnoreField. |
static java.lang.String |
toLoopMmCifHeaderString(java.lang.String categoryName,
java.lang.String className)
Produces a mmCIF loop header string for the given categoryName and className.
|
static <T> java.lang.String |
toMMCIF(java.util.List<T> list,
java.lang.Class<T> klass)
Converts a list of mmCIF beans (see
org.biojava.nbio.structure.io.mmcif.model to
a String representing them in mmCIF loop format with one record per line. |
static java.lang.String |
toMMCIF(java.lang.String categoryName,
java.lang.Object o)
Converts a mmCIF bean (see
org.biojava.nbio.structure.io.mmcif.model to
a String representing it in mmCIF (single-record) format. |
public static final java.lang.String MMCIF_MISSING_VALUE
public static final java.lang.String MMCIF_DEFAULT_VALUE
public static java.lang.String toLoopMmCifHeaderString(java.lang.String categoryName,
java.lang.String className)
throws java.lang.ClassNotFoundException
org.biojava.nbio.structure.io.mmcif.model packagecategoryName - className - java.lang.ClassNotFoundException - if the given className can not be foundpublic static java.lang.String toMMCIF(java.lang.String categoryName,
java.lang.Object o)
org.biojava.nbio.structure.io.mmcif.model to
a String representing it in mmCIF (single-record) format.categoryName - o - public static java.lang.reflect.Field[] getFields(java.lang.Class<?> c)
@IgnoreField.
As a side effect, calls setAccessible(true)
on all fields.c - public static java.lang.String[] getFieldNames(java.lang.reflect.Field[] fields)
@CIFLabel annotation.
As a side effect, calls setAccessible(true)
on all fields.fields - public static <T> java.lang.String toMMCIF(java.util.List<T> list,
java.lang.Class<T> klass)
org.biojava.nbio.structure.io.mmcif.model to
a String representing them in mmCIF loop format with one record per line.list - public static Symmetry convertSpaceGroupToSymmetry(SpaceGroup sg)
Symmetry object.sg - public static Cell convertCrystalCellToCell(CrystalCell c)
Cell object.c - public static AtomSite convertAtomToAtomSite(Atom a, int model, java.lang.String chainName, java.lang.String chainId)
AtomSite object.a - model - the model number for the output AtomSiteschainName - the chain identifier (author id) for the output AtomSiteschainId - the internal chain identifier (asym id) for the output AtomSitespublic static AtomSite convertAtomToAtomSite(Atom a, int model, java.lang.String chainName, java.lang.String chainId, int atomId)
AtomSite object.a - the atommodel - the model number for the output AtomSiteschainName - the chain identifier (author id) for the output AtomSiteschainId - the internal chain identifier (asym id) for the output AtomSitesatomId - the atom id to be written to AtomSitepublic static java.util.List<AtomSite> convertGroupToAtomSites(Group g, int model, java.lang.String chainName, java.lang.String chainId)
AtomSite objects.
Atoms in other altloc groups (different from the main group) are also included, removing possible duplicates
via using the atom identifier to assess uniqueness.g - the groupmodel - the model number for the output AtomSiteschainName - the chain identifier (author id) for the output AtomSiteschainId - the internal chain identifier (asym id) for the output AtomSitespublic static java.util.List<AtomSite> convertChainToAtomSites(Chain c, int model, java.lang.String chainName, java.lang.String chainId)
AtomSite objectsc - the chainmodel - the model number for the output AtomSiteschainName - the chain identifier (author id) for the output AtomSiteschainId - the internal chain identifier (asym id) for the output AtomSitesCopyright © 2000-2020 BioJava. All Rights Reserved.