Skip to content

Commit d848ade

Browse files
author
DocMinus
committed
small fix in pd column naming
1 parent e506697 commit d848ade

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

2AB_reaction_TDs.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python
22
# coding: utf-8
33
"""
4-
V2.1.3 (Mar. 08, 08:00:00 2023)
5-
Update: 2023-06-22 (cleanup for ChemRxiv submission)
4+
V2.1.4 (Mar. 08, 08:00:00 2023)
5+
Update: 2023-06-24 (cleanup for ChemRxiv submission)
66
77
@author: Alexander Minidis (DocMinus)
88
Purpose: TDs from csv
@@ -49,11 +49,12 @@ def main():
4949
# Read
5050
print("\nReading molecules from: ", smiles_input)
5151
in_rct_df = read_rct2pd(smiles_input)
52+
print(in_rct_df.head())
5253

5354
# Clean
54-
cmpd1_smi = clean_smiles_multi(in_rct_df["compound1"].to_list())
55-
cmpd2_smi = clean_smiles_multi(in_rct_df["compound2"].to_list())
56-
prod_smi = clean_smiles_multi(in_rct_df["product"].to_list())
55+
cmpd1_smi = clean_smiles_multi(in_rct_df.iloc[:, 1].to_list())
56+
cmpd2_smi = clean_smiles_multi(in_rct_df.iloc[:, 2].to_list())
57+
prod_smi = clean_smiles_multi(in_rct_df.iloc[:, 3].to_list())
5758

5859
# Calculate TDs
5960
transforms_descriptors = transform_descriptors(cmpd1_smi, cmpd2_smi, prod_smi)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _ID reactant1 reactant2 product_<br>
1919
<br>
2020
The script will provide a simple cleaning of the structures; "extreme" broken structures might not get fixed with the provided method.<br>
2121
<br>
22-
Two small test-sets are provided with made up reactions, one of them containing a "faulty" structure to demonstrate correct filtration in the end result.
22+
Two small test-sets are provided with made up reactions, one of them containing a "faulty" structure to demonstrate correct filtration in the end result. Alternatively, run the _test.py_ script (see below)<br>
2323

2424
## Syntax
2525
If you only want to use the TD function, your script requires the following minimum lines with the smiles as string tuples (even if only a single reaction):

0 commit comments

Comments
 (0)