public class ConformerContainer extends Object implements List<IAtomContainer>
IAtomContainer
containing the atom and bond
details and a List of 3D coordinate sets, each element being the set of 3D coordinates
for a given conformer.
The class behaves in many ways as a List<IAtomContainer>
object, though a few methods are not
implemented. Though it is possible to add conformers by hand, this data structure is
probably best used in combination with IteratingMDLConformerReader
as
IteratingMDLConformerReader reader = new IteratingMDLConformerReader( new FileReader(new File(filename)), DefaultChemObjectBuilder.getInstance()); while (reader.hasNext()) { ConformerContainer cc = (ConformerContainer) reader.next(); for (IAtomContainer conformer : cc) { // do something with each conformer } }
IteratingMDLConformerReader
Constructor and Description |
---|
ConformerContainer() |
ConformerContainer(IAtomContainer atomContainer)
Create a ConformerContainer object from a single molecule object.
|
ConformerContainer(IAtomContainer[] atomContainers)
Create a ConformerContainer from an array of molecules.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(IAtomContainer atomContainer)
Add a conformer to the end of the list.
|
void |
add(int i,
IAtomContainer atomContainer) |
boolean |
addAll(Collection<? extends IAtomContainer> atomContainers) |
boolean |
addAll(int i,
Collection<? extends IAtomContainer> iAtomContainers) |
void |
clear()
Get rid of all the conformers but keeps atom and bond information.
|
boolean |
contains(Object o)
Checks to see whether the specified conformer is currently stored.
|
boolean |
containsAll(Collection<?> objects) |
IAtomContainer |
get(int i)
Get the conformer at a specified position.
|
String |
getTitle()
Get the title of the conformers.
|
int |
indexOf(Object o)
Returns the lowest index at which the specific IAtomContainer appears in the list or -1 if is not found.
|
boolean |
isEmpty()
Checks whether any conformers are stored or not.
|
Iterator<IAtomContainer> |
iterator()
Gets an iterator over the conformers.
|
int |
lastIndexOf(Object o)
Returns the highest index at which the specific IAtomContainer appears in the list or -1 if is not found.
|
ListIterator<IAtomContainer> |
listIterator() |
ListIterator<IAtomContainer> |
listIterator(int i) |
IAtomContainer |
remove(int i)
Removes the conformer at the specified position.
|
boolean |
remove(Object o)
Remove the specified conformer.
|
boolean |
removeAll(Collection<?> objects) |
boolean |
retainAll(Collection<?> objects) |
IAtomContainer |
set(int i,
IAtomContainer atomContainer) |
int |
size()
Get the number of conformers stored.
|
List<IAtomContainer> |
subList(int i,
int i1) |
Object[] |
toArray()
Returns the conformers in the form of an array of IAtomContainers.
|
<IAtomContainer> |
toArray(IAtomContainer[] ts) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public ConformerContainer()
public ConformerContainer(IAtomContainer atomContainer)
add(org.openscience.cdk.interfaces.IAtomContainer)
method.
Note that the constructor will use the title of the input molecule
when adding new molecules as conformers. That is, the title of any molecule
to be added as a conformer should match the title of the input molecule.atomContainer
- The base molecule (or first conformer).public ConformerContainer(IAtomContainer[] atomContainers)
atomContainers
- The array of conformerspublic String getTitle()
public int size()
size
in interface Collection<IAtomContainer>
size
in interface List<IAtomContainer>
public boolean isEmpty()
isEmpty
in interface Collection<IAtomContainer>
isEmpty
in interface List<IAtomContainer>
public boolean contains(Object o)
contains
in interface Collection<IAtomContainer>
contains
in interface List<IAtomContainer>
o
- The IAtomContainer to check forpublic Iterator<IAtomContainer> iterator()
iterator
in interface Iterable<IAtomContainer>
iterator
in interface Collection<IAtomContainer>
iterator
in interface List<IAtomContainer>
public Object[] toArray()
toArray
in interface Collection<IAtomContainer>
toArray
in interface List<IAtomContainer>
public <IAtomContainer> IAtomContainer[] toArray(IAtomContainer[] ts)
toArray
in interface Collection<IAtomContainer>
toArray
in interface List<IAtomContainer>
public boolean add(IAtomContainer atomContainer)
add
in interface Collection<IAtomContainer>
add
in interface List<IAtomContainer>
atomContainer
- The new conformer to add.public boolean remove(Object o)
remove
in interface Collection<IAtomContainer>
remove
in interface List<IAtomContainer>
o
- The conformer to remove (should be castable to IAtomContainer)public boolean containsAll(Collection<?> objects)
containsAll
in interface Collection<IAtomContainer>
containsAll
in interface List<IAtomContainer>
public boolean addAll(Collection<? extends IAtomContainer> atomContainers)
addAll
in interface Collection<IAtomContainer>
addAll
in interface List<IAtomContainer>
public boolean addAll(int i, Collection<? extends IAtomContainer> iAtomContainers)
addAll
in interface List<IAtomContainer>
public boolean removeAll(Collection<?> objects)
removeAll
in interface Collection<IAtomContainer>
removeAll
in interface List<IAtomContainer>
public boolean retainAll(Collection<?> objects)
retainAll
in interface Collection<IAtomContainer>
retainAll
in interface List<IAtomContainer>
public void clear()
clear
in interface Collection<IAtomContainer>
clear
in interface List<IAtomContainer>
public IAtomContainer get(int i)
get
in interface List<IAtomContainer>
i
- The position of the requested conformerpublic IAtomContainer set(int i, IAtomContainer atomContainer)
set
in interface List<IAtomContainer>
public void add(int i, IAtomContainer atomContainer)
add
in interface List<IAtomContainer>
public IAtomContainer remove(int i)
remove
in interface List<IAtomContainer>
i
- The position in the list to removepublic int indexOf(Object o)
indexOf
in interface List<IAtomContainer>
o
- The IAtomContainer whose presence is being testedpublic int lastIndexOf(Object o)
lastIndexOf
in interface List<IAtomContainer>
o
- The IAtomContainer whose presence is being testedpublic ListIterator<IAtomContainer> listIterator()
listIterator
in interface List<IAtomContainer>
public ListIterator<IAtomContainer> listIterator(int i)
listIterator
in interface List<IAtomContainer>
public List<IAtomContainer> subList(int i, int i1)
subList
in interface List<IAtomContainer>
Copyright © 2021. All rights reserved.