Dear all, maybe somebody has a way for this, it would help me so much! I calculated several data sets and saved them as .mol2 files, which are basically .txt files. Now I want to import certain lines of the files into Excel.
The file looks like this:
# File written by LEADIT 2.1.2 (12.06.12)
# Input File / No. : Amantadine_001 0
# Sybyl molecule name: Amantadine_001
@<TRIPOS>MOLECULE Amantadine_001 29 31 SMALL FORMAL_CHARGES
@<TRIPOS>ATOM 1 N1 68.3130 47.3340 37.6690 N.4 1 lig 1.000 [...] 29 H29 68.6150 47.4380 38.6170 H 1 lig 0.000 @<TRIPOS>BOND 1 1 2 1 2 1 27 1 [...] 31 1 29 1
#
#<BIOSOLVEIT.HYDE_SCORE kJ/mol>
#-11
#
#<BIOSOLVEIT.HYDE_LIGAND_EFFICIENCY kcal/mol>
#0.24
#
#<BIOSOLVEIT.HYDE_ATOM_SCORES>
# 1; -3.8; 12.7; -13.4; 13.2; -16.3
# 2; 0.0; 0.0; 0.0; 0.0; 0.0
# 3; 4.0; -0.7; 0.0; 4.8; 0.0
# 4; 0.0; 0.0; 0.0; 0.0; 0.0
# 5; -0.9; -0.4; 0.0; -0.6; 0.0
# 6; -1.9; -1.1; 0.0; -0.8; 0.0
# 7; -3.6; -1.5; 0.0; -2.1; 0.0
# 8; -2.9; -1.3; 0.0; -1.6; 0.0
# 9; -0.2; -0.2; 0.0; 0.0; 0.0
#10; -1.5; -0.8; 0.0; -0.6; 0.0
#11; -0.2; -0.2; 0.0; 0.0; 0.0
#
#
In an optimal case the macro would only extract data with the # in front using a ; a delimiter. For the table <BIOSOLVEIT.HYDE_ATOM_SCORES> it would sum the 2nd column. Afterwards a new table would be created with:
The # Input File / No. : Amantadine_001 0 (Which would be in best case just Amantadine) \ The sum of the Atom Scores \ The value of <BIOSOLVEIT.HYDE_LIGAND_EFFICIENCY kcal/mol>
So the table would look like:
Amantadine 11.7 0.24
Finally I need to select nine different files, at best at the same time, and the second file for example is written in a new row like this:
Amantadine 11.7 0.24
Rimantadine 13.5 0.35
Is this possible? I played a little bit around with the macros but finally could not manage to do it. Maybe it would be easier to first import everything and then delete the not need parts? I also have a table with the correct names in an alphabetic order for each set with additional values, maybe one could use these?
I have so many data sets and my Prof asked me to analyse them till end of the week. And I just realized that my manually created table contains an error! I appreciate any help, thanks so much!
Bookmarks