Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options and results and sdf #11

Merged
merged 7 commits into from
Oct 13, 2020
Merged

Options and results and sdf #11

merged 7 commits into from
Oct 13, 2020

Conversation

dkatzel-ncats
Copy link
Contributor

@dkatzel-ncats dkatzel-ncats commented Oct 13, 2020

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.

  1. Computing the actual molfile formatted String has been moved out of StructureImageExtractor. Previous versions had methods like StructureImageExtractor#toMol() and StructureImageExtractor#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 a MolvecOptions object to set those options and moved the code to generate the mol from the StructureImageExtractor to this new class MolvecOptions#computeResult(ConnectionTable ct)

  2. the old toMol() methods returned a String of the molfile. the new return object from MolvecOptions#computeResult(ConnectionTable ct) now returns a MolvecResult object. This new object has a method getMolfile() but also other methods like getSDfile() and getSDfile( Map properties). There is also a method getOriginalBoundingBox() to address [Feature request] Bounding box #6

  3. MolvecOptions 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.

  4. 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.

@tylerperyea tylerperyea merged commit 067551a into master Oct 13, 2020
@dkatzel-ncats dkatzel-ncats deleted the optionsAndResults branch October 14, 2020 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants