Package org.openscience.cdk
Class FragmentAtom
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IAtom
,IAtomType
,ICDKObject
,IChemObject
,IElement
,IFragmentAtom
,IIsotope
,IPseudoAtom
- Direct Known Subclasses:
DebugFragmentAtom
public class FragmentAtom extends PseudoAtom implements IFragmentAtom
Class to represent an IPseudoAtom which embeds an IAtomContainer. Very much like the MDL MolfileGroup
concept.- Author:
- egonw
- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- data
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openscience.cdk.interfaces.IAtomType
IAtomType.Hybridization
-
-
Field Summary
-
Fields inherited from class org.openscience.cdk.Atom
charge, fractionalPoint3d, hydrogenCount, point2d, point3d, stereoParity
-
Fields inherited from class org.openscience.cdk.AtomType
electronValency, formalCharge, formalNeighbourCount, hybridization
-
Fields inherited from class org.openscience.cdk.Isotope
exactMass, naturalAbundance
-
Fields inherited from class org.openscience.cdk.Element
atomicNumber
-
Fields inherited from interface org.openscience.cdk.interfaces.IElement
Ac, Ag, Al, Am, Ar, As, At, Au, B, Ba, Be, Bh, Bi, Bk, Br, C, Ca, Cd, Ce, Cf, Cl, Cm, Cn, Co, Cr, Cs, Cu, Db, Ds, Dy, Er, Es, Eu, F, Fe, Fl, Fm, Fr, Ga, Gd, Ge, H, He, Hf, Hg, Ho, Hs, I, In, Ir, K, Kr, La, Li, Lr, Lu, Lv, Mc, Md, Mg, Mn, Mo, Mt, N, Na, Nb, Nd, Ne, Nh, Ni, No, Np, O, Og, Os, P, Pa, Pb, Pd, Pm, Po, Pr, Pt, Pu, Ra, Rb, Re, Rf, Rg, Rh, Rn, Ru, S, Sb, Sc, Se, Sg, Si, Sm, Sn, Sr, Ta, Tb, Tc, Te, Th, Ti, Tl, Tm, Ts, U, V, W, Wildcard, Xe, Y, Yb, Zn, Zr
-
-
Constructor Summary
Constructors Constructor Description FragmentAtom()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFragmentAtom
clone()
Clones this atom object and its content.Double
getExactMass()
The exact mass of an FragmentAtom is defined as the sum of exact masses of the IAtom's in the fragment.IAtomContainer
getFragment()
Returns the fully expended form of the IFragmentAtom.boolean
isExpanded()
Helper method to indicate that the method should be drawn fully, and not just the abbreviated form.void
setExactMass(Double mass)
Sets the ExactMass attribute of the Isotope object.void
setExpanded(boolean bool)
Sets whether this atom is to be fully drawn and not just in the abbreviated form.void
setFragment(IAtomContainer fragment)
Sets the fully expended form of the IFragmentAtom.String
toString()
Returns a one line string representation of this Atom.-
Methods inherited from class org.openscience.cdk.PseudoAtom
getAttachPointNum, getLabel, setAttachPointNum, setLabel, setStereoParity
-
Methods inherited from class org.openscience.cdk.Atom
bonds, compare, equals, getBond, getBondCount, getCharge, getContainer, getFractionalPoint3d, getImplicitHydrogenCount, getIndex, getMapIdx, getPoint2d, getPoint3d, getStereoParity, hashCode, isAromatic, isInRing, setCharge, setFractionalPoint3d, setImplicitHydrogenCount, setIsAromatic, setIsInRing, setMapIdx, setPoint2d, setPoint3d
-
Methods inherited from class org.openscience.cdk.AtomType
getAtomTypeName, getBondOrderSum, getCovalentRadius, getFormalCharge, getFormalNeighbourCount, getHybridization, getMaxBondOrder, getValency, setAtomTypeName, setBondOrderSum, setCovalentRadius, setFormalCharge, setFormalNeighbourCount, setHybridization, setMaxBondOrder, setValency
-
Methods inherited from class org.openscience.cdk.Isotope
getMassNumber, getNaturalAbundance, setMassNumber, setNaturalAbundance
-
Methods inherited from class org.openscience.cdk.Element
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
-
Methods inherited from class org.openscience.cdk.ChemObject
addListener, addProperties, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopy
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.interfaces.IAtom
bonds, getBond, getBondCount, getCharge, getContainer, getFractionalPoint3d, getImplicitHydrogenCount, getIndex, getMapIdx, getPoint2d, getPoint3d, getStereoParity, isAromatic, isInRing, setCharge, setFractionalPoint3d, setImplicitHydrogenCount, setIsAromatic, setIsInRing, setMapIdx, setPoint2d, setPoint3d, setStereoParity
-
Methods inherited from interface org.openscience.cdk.interfaces.IAtomType
getAtomTypeName, getBondOrderSum, getCovalentRadius, getFormalCharge, getFormalNeighbourCount, getHybridization, getMaxBondOrder, getValency, setAtomTypeName, setBondOrderSum, setCovalentRadius, setFormalCharge, setFormalNeighbourCount, setHybridization, setMaxBondOrder, setValency
-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Methods inherited from interface org.openscience.cdk.interfaces.IElement
getAtomicNumber, getSymbol, setAtomicNumber, setSymbol
-
Methods inherited from interface org.openscience.cdk.interfaces.IIsotope
getMassNumber, getNaturalAbundance, setMassNumber, setNaturalAbundance
-
Methods inherited from interface org.openscience.cdk.interfaces.IPseudoAtom
getAttachPointNum, getLabel, setAttachPointNum, setLabel
-
-
-
-
Method Detail
-
isExpanded
public boolean isExpanded()
Description copied from interface:IFragmentAtom
Helper method to indicate that the method should be drawn fully, and not just the abbreviated form.- Specified by:
isExpanded
in interfaceIFragmentAtom
- Returns:
- true, if it should be considered in expended form
-
setExpanded
public void setExpanded(boolean bool)
Description copied from interface:IFragmentAtom
Sets whether this atom is to be fully drawn and not just in the abbreviated form.- Specified by:
setExpanded
in interfaceIFragmentAtom
- Parameters:
bool
- true if the full structure should be drawn
-
getFragment
public IAtomContainer getFragment()
Description copied from interface:IFragmentAtom
Returns the fully expended form of the IFragmentAtom.- Specified by:
getFragment
in interfaceIFragmentAtom
- Returns:
- the fully expanded form as an IAtomContainer object
-
setFragment
public void setFragment(IAtomContainer fragment)
Description copied from interface:IFragmentAtom
Sets the fully expended form of the IFragmentAtom.- Specified by:
setFragment
in interfaceIFragmentAtom
- Parameters:
fragment
- The fragment
-
setExactMass
public void setExactMass(Double mass)
Description copied from class:Isotope
Sets the ExactMass attribute of the Isotope object.- Specified by:
setExactMass
in interfaceIIsotope
- Overrides:
setExactMass
in classIsotope
- Parameters:
mass
- The new ExactMass value- See Also:
Isotope.getExactMass()
-
getExactMass
public Double getExactMass()
The exact mass of an FragmentAtom is defined as the sum of exact masses of the IAtom's in the fragment.- Specified by:
getExactMass
in interfaceIIsotope
- Overrides:
getExactMass
in classIsotope
- Returns:
- The ExactMass value
- See Also:
Isotope.setExactMass(java.lang.Double)
-
toString
public String toString()
Description copied from class:PseudoAtom
Returns a one line string representation of this Atom. Methods is conform RFC #9.- Specified by:
toString
in interfaceIChemObject
- Overrides:
toString
in classPseudoAtom
- Returns:
- The string representation of this Atom
-
clone
public IFragmentAtom clone() throws CloneNotSupportedException
Description copied from class:Atom
Clones this atom object and its content.- Specified by:
clone
in interfaceIAtom
- Specified by:
clone
in interfaceIChemObject
- Specified by:
clone
in interfaceIPseudoAtom
- Overrides:
clone
in classPseudoAtom
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-