if (molecules.size() > 0) {
IAtomContainerSet molSet = molecules.get(0).getBuilder().newInstance(IAtomContainerSet.class);
for (IAtomContainer mol : molecules) {
molSet.addAtomContainer(mol);
}
SDFWriter sdfWriter = new SDFWriter(new FileWriter(outFile));
sdfWriter.write(molSet);
sdfWriter.close();
}
} catch (Exception e) {
e.printStackTrace();
JOptionPane.showMessageDialog(jcpPanel, GT.get("There was an error generating the configurations {0}", e.getMessage()));
return;