forked from mordred-descriptor/mordred
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi all, I have a question to ask, is there a possibility that we can actually speed the calculations up? It's awesome that mordred is still maintained!
Why speed calculations up?
I have about 90,000 molecules to calculate chemical descriptors and it takes somewhere between 4 hours to 5 hours.
The code
def calculate_3D_function(mols, input_filename):
calc_3D = Calculator(descriptors, ignore_3D=False) # Initialise 3D descriptors
# Calculate descriptors
print(f"Calculating 3D descriptors for {input_filename}...")
# Start timer
start_time = time.time()
df = calc_3D.pandas(mols)
print(df.head()) # Display the top rows
# Create output filename based on input filename
output_filename = f"{os.path.splitext(input_filename)[0]}_descriptors.csv"
df.to_csv(output_filename, index=False) # Save to CSV
print(f"Descriptors saved to {output_filename}")
# Calculate elapsed time
elapsed_time = time.time() - start_time
print(f"Processing completed in {elapsed_time:.2f} seconds.\n")
Metadata
Metadata
Assignees
Labels
No labels