Package chemaxon.struc
Interface WSmolecule
- All Superinterfaces:
Incomplecule
,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
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAtom
(int atno) Adds an atom.void
Adds an atom from another Smolecule.void
addBond
(int atom1, int atom2, int type) Adds a bond.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.default void
setRadical
(int atom, int rad) Deprecated, for removal: This API element is subject to removal in a future version.void
setRadicalValue
(int atom, AtomProperty.Radical 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.Incomplecule
getAtomCount, getBondCount, getName, properties
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, getRadicalValue, getRgroupId, getValence, inAtomList
-
Method Details
-
newInstance
Creates a new WSmolecule instance with the specified capacity.- Parameters:
na
- the maximum number of atomsnb
- the maximum number of bondsaflags
- arrays to enable, seeSmolecule.A_ALL
-
reset
void reset(int aflags) Clears the molecule and sets the array flags.- Parameters:
aflags
- the array flags
-
addAtom
Adds an atom from another Smolecule.- Parameters:
smol
- the other Smoleculek
- 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 indexatom2
- second atom indextype
- 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 indexchg
- the charge
-
setRadical
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) default void setRadical(int atom, int rad) Deprecated, for removal: This API element is subject to removal in a future version.UsesetRadicalValue(int, Radical)
insteadSets the radical value of an atom.- Parameters:
atom
- the atom indexrad
- the radical value
-
setRadicalValue
Sets the radical value of an atom.- Parameters:
atom
- the atom indexrad
- the radical value
-
setHybridizationState
void setHybridizationState(int atom, int hs) Sets the hybridization state of an atom.- Parameters:
atom
- the atom indexhs
- the hybridization state- See Also:
-
setMassno
void setMassno(int atom, int m) Sets the mass number.- Parameters:
atom
- the atom indexm
- the mass number or zero to unset
-
setValence
void setValence(int atom, int v) Sets the valence.- Parameters:
atom
- the atom indexv
- the valence
-
setImplicitHcount
void setImplicitHcount(int atom, int h) Sets the number of implicit Hydrogens.- Parameters:
atom
- the atom indexh
- the number of implicit Hydrogens
-
setRgroupId
void setRgroupId(int atom, int rgid) Sets the R-group identifier of an atom.- Parameters:
atom
- the atom indexrgid
- 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 indexmap
- the map value (positive integer) or 0
-
setAtomStereo
void setAtomStereo(int atom, int stereo) Sets atom stereo properties.- Parameters:
atom
- the atom indexstereo
- parity | chirality- See Also:
-
setRadicalValue(int, Radical)
instead