Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7625267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:10:10+00:00 2026-05-31T05:10:10+00:00

How do I access the getOptimizedMol() method within a fixed threadExecutor? I need to

  • 0

How do I access the getOptimizedMol() method within a fixed threadExecutor? I need to get the return Molecules as each optimizer thread finishes up?

import chemaxon.marvin.calculations.ConformerPlugin;
import chemaxon.marvin.plugin.PluginException;
import chemaxon.struc.Molecule;

public class Optimizer3D implements Runnable {


    private Molecule mol3D;
    private Molecule mol2D;

    Optimizer3D(Molecule mol2D_)
    {
       this.mol2D = mol2D_; 
    }

    @Override
    public void run() {
        mol3D = chemAxonOptimizer();
    }

    private Molecule chemAxonOptimizer()
    {
        //optimize molecule code not shown
        return molecule;

    }


    public Molecule getOptimizedMol()
    {
        return mol3D;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:10:10+00:00Added an answer on May 31, 2026 at 5:10 am

    use Callable :

    public class Optimizer3D implements Callable<Molecule>{
        private Molecule mol3D;
        private Molecule mol2D;
    
        Optimizer3D(Molecule mol2D_)
        {
           this.mol2D = mol2D_; 
        }
    
        @Override
        public Molecule call() {
            mol3D = chemAxonOptimizer();
            return getOptimizedMol();
        }
    
        private Molecule chemAxonOptimizer()
        {
            //optimize molecule code not shown
            return molecule;
    
        }
    
    
        private Molecule getOptimizedMol()
        {
            return mol3D;
        }
    }
    

    then from your Executor:

    Future<Molecule > future = executor.submit(yourTask);
    Molecule  yourValue = future.get();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I access a web service in a POST method. I need to send to
I need to get access to a variable from another class and I keep
Which access modifiers which when used with the method makes it available to all
Example: // access fields directly private void doThis() { return doSomeWork(this.data); } // receive
My Access table has product name and price for each record. I want to
in Access DB ... I need to extract the itemcode / desc combination for
In Access 2003 I need to display numbers like this while keeping the leading
access using URL: http://127.0.0.1/test.jsp?action=test&abc or http://127.0.0.1/test.jsp?abc how can I get the String abc ?
Root access is possible. Basically I need a way to read content: //settings/system/alarm_alert from
In Access 2003 I was easily able to get to all the tables and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.