So I wanted to set readConnect and useRebondTool to false on the org.openscience.cdk.io.PDBReader.
Turns out, the way to do this is:
Turns out, the way to do this is:
PDBReader reader = new PDBReader(new FileReader(input));Hmm. Not so easy. Maybe reflection in the base DefaultChemObjectReader class could allow the Readers to have set(String propertyName, String value) methods?
Properties properties = new Properties();
properties.setProperty("ReadConnectSection", "false");
properties.setProperty("UseRebondTool", "false");
PropertiesListener listener =
new PropertiesListener(properties);
reader.addChemObjectIOListener(listener);
reader.customizeJob();
Comments
The use case of ask questions upon "Save" was the reason why a listener approach was used.
There is a paper in a CDK News (http://www.cdknews.org/) that describes the listener model in more detail.