Retrieve a List of all ChemObject objects within an IChemModel.

@param chemModel  The IChemModel object.
@return           A List of all ChemObjects inside.
320873
public static List<IChemObject> getAllChemObjects(IChemModel chemModel) {
        List<IChemObject> list = new ArrayList<IChemObject>();
        // list.add(chemModel); // only add ChemObjects contained within
        ICrystal crystal = chemModel.getCrystal();
        if (crystal != null) {
            list.add(crystal);
        }
        IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
        if (moleculeSet != null) {
            list.add(moleculeSet);
            List<IChemObject> current = MoleculeSetManipulator.getAllChemObjects(moleculeSet);
            for (IChemObject chemObject : current) {
                if (!list.contains(chemObject)) list.add(chemObject);
            }
        }
        IReactionSet reactionSet = chemModel.getReactionSet();
        if (reactionSet != null) {
            list.add(reactionSet);
            List<IChemObject> current = ReactionSetManipulator.getAllChemObjects(reactionSet);
            for (IChemObject chemObject : current) {
                if (!list.contains(chemObject)) list.add(chemObject);
            }
        }
        return list;
    }
657811
public static int getAtomCount(IChemModel chemModel) {
        int count = 0;
        ICrystal crystal = chemModel.getCrystal();
        if (crystal != null) {
            count += crystal.getAtomCount();
        }
        IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
        if (moleculeSet != null) {
            count += MoleculeSetManipulator.getAtomCount(moleculeSet);
        }
        IReactionSet reactionSet = chemModel.getReactionSet();
        if (reactionSet != null) {
            count += ReactionSetManipulator.getAtomCount(reactionSet);
        }
        return count;
    }
719322
public static Map<String, MethodNode> getDeclaredMethodsFromInterfaces(ClassNode cNode) {
        Map<String, MethodNode> result = new HashMap<String, MethodNode>();
        ClassNode[] interfaces = cNode.getInterfaces();
        for (ClassNode iface : interfaces) {
            result.putAll(iface.getDeclaredMethodsMap());
        }
        return result;
    }
290519
public static List<CommerceDiscountUserSegmentRel> toModels(
		CommerceDiscountUserSegmentRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceDiscountUserSegmentRel> models = new ArrayList<CommerceDiscountUserSegmentRel>(soapModels.length);

		for (CommerceDiscountUserSegmentRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
1342177
public List<FacesConfigFlowDefinitionFacesMethodCallType<FacesConfigFlowDefinitionType<T>>> getAllMethodCall()
   {
      List<FacesConfigFlowDefinitionFacesMethodCallType<FacesConfigFlowDefinitionType<T>>> list = new ArrayList<FacesConfigFlowDefinitionFacesMethodCallType<FacesConfigFlowDefinitionType<T>>>();
      List<Node> nodeList = childNode.get("method-call");
      for(Node node: nodeList)
      {
         FacesConfigFlowDefinitionFacesMethodCallType<FacesConfigFlowDefinitionType<T>>  type = new FacesConfigFlowDefinitionFacesMethodCallTypeImpl<FacesConfigFlowDefinitionType<T>>(this, "method-call", childNode, node);
         list.add(type);
      }
      return list;
   }
609370
@Override
    public void addChemModel(IChemModel chemModel) {
        if (chemModelCount + 1 >= chemModels.length) {
            growChemModelArray();
        }
        chemModels[chemModelCount] = chemModel;
        chemModelCount++;
    }
1023855
public static boolean has3DCoordinates(IChemModel chemModel) {
        List<IAtomContainer> acs = ChemModelManipulator.getAllAtomContainers(chemModel);
        for (IAtomContainer ac : acs) {
            if (!has3DCoordinates(ac)) {
                return false;
            }
        }
        return true;
    }
1248707
public static List<CPDefinitionLink> toModels(
		CPDefinitionLinkSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CPDefinitionLink> models = new ArrayList<CPDefinitionLink>(soapModels.length);

		for (CPDefinitionLinkSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
414652
public static List<CommercePriceListAccountRel> toModels(
		CommercePriceListAccountRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommercePriceListAccountRel> models = new ArrayList<CommercePriceListAccountRel>(soapModels.length);

		for (CommercePriceListAccountRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
507871
public static List<CommerceShipmentItem> toModels(
		CommerceShipmentItemSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CommerceShipmentItem> models = new ArrayList<CommerceShipmentItem>(soapModels.length);

		for (CommerceShipmentItemSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
942037
public static IAtomContainer createNewMolecule(IChemModel chemModel) {
        // Add a new molecule either the set of molecules
        IAtomContainer molecule = chemModel.getBuilder().newInstance(IAtomContainer.class);
        if (chemModel.getMoleculeSet() != null) {
            IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
            for (int i = 0; i < moleculeSet.getAtomContainerCount(); i++) {
                if (moleculeSet.getAtomContainer(i).getAtomCount() == 0) {
                    moleculeSet.removeAtomContainer(i);
                    i--;
                }
            }
            moleculeSet.addAtomContainer(molecule);
        } else {
            IAtomContainerSet moleculeSet = chemModel.getBuilder().newInstance(IAtomContainerSet.class);
            moleculeSet.addAtomContainer(molecule);
            chemModel.setMoleculeSet(moleculeSet);
        }
        return molecule;
    }
794212
protected void growChemModelArray() {
        ChemModel[] newchemModels = new ChemModel[chemModels.length + growArraySize];
        System.arraycopy(chemModels, 0, newchemModels, 0, chemModels.length);
        chemModels = newchemModels;
    }
709311
public static List<CPRuleAssetCategoryRel> toModels(
		CPRuleAssetCategoryRelSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CPRuleAssetCategoryRel> models = new ArrayList<CPRuleAssetCategoryRel>(soapModels.length);

		for (CPRuleAssetCategoryRelSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}
55123
public List<Vec> getDataVectors()
    {
        List<Vec> vecs = new ArrayList<>(size());
        for(int i = 0; i < size(); i++)
            vecs.add(getDataPoint(i).getNumericalValues());
        return vecs;
    }
589403
public static List<IAtomContainer> getAllAtomContainers(IChemSequence sequence) {
        List<IAtomContainer> acList = new ArrayList<IAtomContainer>();
        for (IChemModel model : sequence.chemModels()) {
            acList.addAll(ChemModelManipulator.getAllAtomContainers(model));
        }
        return acList;
    }
122467
public static IReaction getRelevantReaction(IChemModel chemModel, IAtom atom) {
        IReaction reaction = null;
        if (chemModel.getReactionSet() != null) {
            IReactionSet reactionSet = chemModel.getReactionSet();
            reaction = ReactionSetManipulator.getRelevantReaction(reactionSet, atom);
        }
        return reaction;
    }
1038923
public static List<CPOptionCategory> toModels(
		CPOptionCategorySoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CPOptionCategory> models = new ArrayList<CPOptionCategory>(soapModels.length);

		for (CPOptionCategorySoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}