Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.xmlcml.simplecml
Class SimpleAtom  view SimpleAtom download SimpleAtom.java

java.lang.Object
  extended byorg.xmlcml.simplecml.SimpleAtom

public class SimpleAtom
extends java.lang.Object

SimpleAtom manages a subset of CML functionality for atoms. It lacks many of the more sophisticated setters and getters and exposes the atom children directly (e.g. hydrogenCount). It should only be used with SimpleMolecule and SimpleBond.

Typical code:

	SimpleAtom atom = new SimpleAtom();
	atom.id = "a123";
	atom.elementType="Na";
	atom.formalCharge=1;


Field Summary
 java.lang.String elementType
          elementType (1- or 2- letter atom symbol, e.g.
 int formalCharge
          number of attached hydrogens: default = 0
 int hydrogenCount
          number of attached hydrogens: default = 0
 java.lang.String id
          the atom id; mandatory and should be unique
 java.lang.String namespace
          the namespace
 double x2
          2D x-coordinate (arbitrary units); default=NaN
 double x3
          3D x-coordinate (Angstrom); default=NaN
 double y2
          2D y-coordinate (arbitrary units); default=NaN
 double y3
          3D y-coordinate (Angstrom); default=NaN
 double z3
          3D z-coordinate (Angstrom); default=NaN
 
Constructor Summary
SimpleAtom()
          constructs a SimpleAtom with default child values
SimpleAtom(java.lang.String namespace)
          constructs a SimpleAtom with default child values and namespace
 
Method Summary
 java.lang.String toCML(java.lang.String prefix)
          well-formed CML for an atom; uninitialised children are not included
 java.lang.String toString()
          diagnostic string for an atom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hydrogenCount

public int hydrogenCount
number of attached hydrogens: default = 0


formalCharge

public int formalCharge
number of attached hydrogens: default = 0


elementType

public java.lang.String elementType
elementType (1- or 2- letter atom symbol, e.g. "Na", "Cl"; mandatory


id

public java.lang.String id
the atom id; mandatory and should be unique


x2

public double x2
2D x-coordinate (arbitrary units); default=NaN


y2

public double y2
2D y-coordinate (arbitrary units); default=NaN


x3

public double x3
3D x-coordinate (Angstrom); default=NaN


y3

public double y3
3D y-coordinate (Angstrom); default=NaN


z3

public double z3
3D z-coordinate (Angstrom); default=NaN


namespace

public java.lang.String namespace
the namespace

Constructor Detail

SimpleAtom

public SimpleAtom()
constructs a SimpleAtom with default child values


SimpleAtom

public SimpleAtom(java.lang.String namespace)
constructs a SimpleAtom with default child values and namespace

Method Detail

toString

public java.lang.String toString()
diagnostic string for an atom


toCML

public java.lang.String toCML(java.lang.String prefix)
well-formed CML for an atom; uninitialised children are not included