|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectastex.MoleculeIO
public class MoleculeIO
22-05-01 mjh add .sdf as a file type for mol files. 25-05-00 mjh make file types default to pdb files. A class for reading and writing molecules from various file formats.
| Field Summary | |
|---|---|
static java.lang.String |
MDLMol
MDL mol file. |
static java.lang.String |
PDBFile
PDB file. |
static java.lang.String |
SimpleMol
simple mol file. |
static java.lang.String |
SybylMol2
SYBYL mol file. |
static java.lang.String |
TmeshMol
simple tmesh file. |
static java.lang.String |
XyzrMol
simple xyzr file. |
| Constructor Summary | |
|---|---|
MoleculeIO()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getAtomName(char a,
char b,
char c,
char d)
Look up the atom name. |
static int |
getElementFromPDBAtomLabel(char c0,
char c1)
Assign element type from pdb atom label. |
static java.lang.String |
getResidueName(char a,
char b,
char c)
Look up the residue name. |
static java.lang.String |
getTypeFromExtension(java.lang.String filename)
Static mapping of file extensions to AstexViewer molecule types. |
static boolean |
isSolventAtom()
Is the atom label a solvent label. |
static boolean |
needNewResidue(int currentResidueNumber,
char currentInsertionCode,
char currentResidueA,
char currentResidueB,
char currentResidueC)
Do we need a new residue? |
static Molecule |
read(java.lang.String filename)
Convenience method that will try and determine a file type from its extension (not foolproof). |
static Molecule |
read(java.lang.String type,
FILE file)
Main entry point for reading a molecule file. |
static boolean |
readAtomBlock(FILE file,
int atomCount,
Molecule molecule)
Read the Sybyl atom block. |
static void |
readBondBlock(FILE file,
int bondCount,
Molecule molecule,
boolean atomsInOrder)
Read the Sybyl atom block. |
static Molecule |
readMDLMol(FILE file)
Read an an MDL mol file. |
static Molecule |
readMol2(FILE file)
Read a SYBYL mol file. |
static Molecule |
readPDB(FILE file)
Read a PDB file from the input. |
static Atom |
readPDBAtom(FILE file,
Molecule molecule)
Read a pdb atom from the current record. |
static void |
readScaleRecord(Molecule molecule,
FILE file)
Read a scale record from the input file. |
static Molecule |
readSimple(FILE file)
Read an an MDL mol file. |
static Molecule |
readTmesh(FILE file)
|
static void |
readUnitCell(Molecule molecule,
FILE file)
Read the unit cell info from the current line. |
static Molecule |
readXyzr(FILE file)
|
static void |
summariseMolecule(Molecule molecule)
Summarise the contents of a molecule. |
static void |
write(Molecule molecule,
FILE output)
Write a Molecule. |
static void |
write(Molecule molecule,
FILE output,
java.lang.String type)
|
static void |
writeMDLMol(Molecule molecule,
FILE output)
Write an MDL mol file to the output stream. |
static void |
writeMDLMol(Molecule molecule,
FILE output,
boolean dollars)
|
static void |
writeMDLMolSeparator(FILE output)
Write a molecule separator to the output stream. |
static void |
writeMol2(Molecule molecule,
FILE output)
Write an Sybyl mol2 file to the output stream. |
static void |
writePDB(Molecule molecule,
FILE output)
Write a molecule out as a PDB file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SybylMol2
public static final java.lang.String MDLMol
public static final java.lang.String SimpleMol
public static final java.lang.String XyzrMol
public static final java.lang.String TmeshMol
public static final java.lang.String PDBFile
| Constructor Detail |
|---|
public MoleculeIO()
| Method Detail |
|---|
public static java.lang.String getTypeFromExtension(java.lang.String filename)
public static Molecule read(java.lang.String filename)
public static Molecule read(java.lang.String type,
FILE file)
public static void readBondBlock(FILE file,
int bondCount,
Molecule molecule,
boolean atomsInOrder)
public static boolean readAtomBlock(FILE file,
int atomCount,
Molecule molecule)
public static Molecule readMol2(FILE file)
public static void summariseMolecule(Molecule molecule)
public static Molecule readTmesh(FILE file)
public static Molecule readXyzr(FILE file)
public static Molecule readSimple(FILE file)
public static Molecule readMDLMol(FILE file)
public static boolean needNewResidue(int currentResidueNumber,
char currentInsertionCode,
char currentResidueA,
char currentResidueB,
char currentResidueC)
public static Molecule readPDB(FILE file)
public static void readScaleRecord(Molecule molecule,
FILE file)
public static void readUnitCell(Molecule molecule,
FILE file)
public static Atom readPDBAtom(FILE file,
Molecule molecule)
public static boolean isSolventAtom()
public static int getElementFromPDBAtomLabel(char c0,
char c1)
public static java.lang.String getResidueName(char a,
char b,
char c)
public static java.lang.String getAtomName(char a,
char b,
char c,
char d)
public static void write(Molecule molecule,
FILE output)
public static void write(Molecule molecule,
FILE output,
java.lang.String type)
public static void writePDB(Molecule molecule,
FILE output)
public static void writeMol2(Molecule molecule,
FILE output)
public static void writeMDLMol(Molecule molecule,
FILE output)
public static void writeMDLMol(Molecule molecule,
FILE output,
boolean dollars)
public static void writeMDLMolSeparator(FILE output)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||