chemaxon.struc
Interface WSmolecule

All Superinterfaces:
Incomplecule, Smolecule

public interface WSmolecule
extends Smolecule

Writable abstract molecule class.

PLEASE DO NOT IMPLEMENT THIS INTERFACE! It may get more abstract methods in later versions.

Since:
Marvin 5.3, 05/21/2009
Version:
5.3, 06/04/2009
Author:
Peter Csizmadia

Field Summary
 
Fields inherited from interface chemaxon.struc.Smolecule
A_ALL, A_ASTEREO, A_ATOMMAP, A_BOND, A_CHARGE, A_CHIRALITY, A_EXPLH, A_HYBRIDIZATION, A_IMPLH, A_MASSNO, A_PARITY, A_RADICAL, A_RGROUP, A_VALENCE, RGROUP_MAX
 
Method Summary
 void addAtom(int atno)
          Adds an atom.
 void addAtom(Smolecule smol, int k)
          Adds an atom from another Smolecule.
 void addBond(int atom1, int atom2, int type)
          Adds a bond.
 WSmolecule newInstance(int na, int nb, int aflags)
          Creates a new WSmolecule instance with the specified capacity.
 void removeAtom(int k)
          Removes an atom.
 void removeBond(int k)
          Removes a bond.
 void reset(int aflags)
          Clears the molecule and sets the array flags.
 void setAtomMap(int atom, int map)
          Sets the atom-atom mapping number.
 void setAtomStereo(int atom, int stereo)
          Sets atom stereo properties.
 void setCharge(int atom, int chg)
          Sets the charge of an ion.
 void setHybridizationState(int atom, int hs)
          Sets the hybridization state of an atom.
 void setImplicitHcount(int atom, int h)
          Sets the number of implicit Hydrogens.
 void setMassno(int atom, int m)
          Sets the mass number.
 void setRadical(int atom, int rad)
          Sets the radical value of an atom.
 void setRgroupId(int atom, int rgid)
          Sets the R-group identifier of an atom.
 void setValence(int atom, int v)
          Sets the valence.
 
Methods inherited from interface chemaxon.struc.Smolecule
areNeighbors, gearch, getArrayFlags, getAtom1, getAtom2, getAtomMap, getAtomStereo, getAtomType, getBondFlags, getBondIndex, getBondType, getBondType, getCharge, getChirality, getExplicitHcount, getHcount, getHybridizationState, getImplicitHcount, getImplicitHcount, getMassno, getNeighbor, getNeighborCount, getParity, getQPropAsInt, getRadical, getRgroupId, getValence, inAtomList
 
Methods inherited from interface chemaxon.struc.Incomplecule
getAtomCount, getBondCount, getName, properties
 

Method Detail

newInstance

WSmolecule newInstance(int na,
                       int nb,
                       int aflags)
Creates a new WSmolecule instance with the specified capacity.

Parameters:
na - the maximum number of atoms
nb - the maximum number of bonds
aflags - arrays to enable, see Smolecule.A_ALL

reset

void reset(int aflags)
Clears the molecule and sets the array flags.

Parameters:
aflags - the array flags

addAtom

void addAtom(Smolecule smol,
             int k)
Adds an atom from another Smolecule.

Parameters:
smol - the other Smolecule
k - atom index in smol

addAtom

void addAtom(int atno)
Adds an atom.

Parameters:
atno - the atomic number

addBond

void addBond(int atom1,
             int atom2,
             int type)
Adds a bond.

Parameters:
atom1 - first atom index
atom2 - second atom index
type - bond type

removeAtom

void removeAtom(int k)
Removes an atom.

Parameters:
k - the atom index

removeBond

void removeBond(int k)
Removes a bond.

Parameters:
k - the bond index

setCharge

void setCharge(int atom,
               int chg)
Sets the charge of an ion.

Parameters:
atom - the atom index
chg - the charge

setRadical

void setRadical(int atom,
                int rad)
Sets the radical value of an atom.

Parameters:
atom - the atom index
rad - the radical value

setHybridizationState

void setHybridizationState(int atom,
                           int hs)
Sets the hybridization state of an atom.

Parameters:
atom - the atom index
hs - the hybridization state
See Also:
HybridizationStateConsts

setMassno

void setMassno(int atom,
               int m)
Sets the mass number.

Parameters:
atom - the atom index
m - the mass number or zero to unset

setValence

void setValence(int atom,
                int v)
Sets the valence.

Parameters:
atom - the atom index
v - the valence

setImplicitHcount

void setImplicitHcount(int atom,
                       int h)
Sets the number of implicit Hydrogens.

Parameters:
atom - the atom index
h - the number of implicit Hydrogens

setRgroupId

void setRgroupId(int atom,
                 int rgid)
Sets the R-group identifier of an atom.

Parameters:
atom - the atom index
rgid - the R-group identifier or 0 to unset

setAtomMap

void setAtomMap(int atom,
                int map)
Sets the atom-atom mapping number.

Parameters:
atom - the atom index
map - the map value (positive integer) or 0

setAtomStereo

void setAtomStereo(int atom,
                   int stereo)
Sets atom stereo properties.

Parameters:
atom - the atom index
stereo - parity | chirality
See Also:
StereoConstants.PARITY_ODD, StereoConstants.PARITY_EVEN, StereoConstants.PARITY_UNSPEC, StereoConstants.PARITY_EITHER, StereoConstants.PARITY_MASK, StereoConstants.CHIRALITY_R, StereoConstants.CHIRALITY_S, StereoConstants.CHIRALITY_MASK