Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request improves the public API and stand alone command line tool for a better user experience. This should also add support for the feature request in #6 among others.
Computing the actual molfile formatted String has been moved out of
StructureImageExtractor
. Previous versions had methods likeStructureImageExtractor#toMol()
andStructureImageExtractor#toMol(double, boolean, boolean)
to make some changes to atom coordinates in the output mol but adding any more options would explode the combinations of method signatures and lists of booleans are not intent revealing. So I made aMolvecOptions
object to set those options and moved the code to generate the mol from the StructureImageExtractor to this new classMolvecOptions#computeResult(ConnectionTable ct)
the old
toMol()
methods returned a String of the molfile. the new return object fromMolvecOptions#computeResult(ConnectionTable ct)
now returns aMolvecResult
object. This new object has a methodgetMolfile()
but also other methods likegetSDfile()
andgetSDfile( Map properties)
. There is also a methodgetOriginalBoundingBox()
to address [Feature request] Bounding box #6MolvecOptions has a new
setName()
method. This will set the name as the first line in the header block of the molfile and can also be set as a name property in the SDfile. When using the commandline tool, the file name without the file extension will be used as the name.The commandline tool now has a new
-outSdf
option to write out all the extracted connection tables in a directory of images into a single SDfile instead of 1 mol file per image. This also supports multithreading. Using this option will set the name as the file name without the file extension and it will also set a property for the file name with the original image file name.