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

Updated Ligand Motifs Code #59

Open
wants to merge 285 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
285 commits
Select commit Hold shift + click to select a range
5b1ab0b
Quick edit to allow user to toggle between using fa_atr/rep or whole …
toadlover May 14, 2024
6db8ba2
Adding highresdock_with_whole_score_fxn for motifs code
toadlover May 14, 2024
7aaca83
ran beautify on LigandDiscoverySearch.cc
May 14, 2024
0fc0d2d
adjusted use of HRD for each score function
toadlover May 14, 2024
b1c3fa6
beautify
May 14, 2024
1ae0e57
Removed unused constraints score function, removed set_weights calls …
toadlover May 14, 2024
c7e4abe
Removed unused call of PDBinfo
toadlover May 14, 2024
90b2964
Adjusting smaller score functions to be derived from ligand.wts and t…
toadlover May 14, 2024
838fff6
beautify
toadlover May 14, 2024
f3062e5
set coordinate_constraint to zero for the whole function (creates str…
toadlover May 17, 2024
1efb27e
adding LDS.cc
May 18, 2024
280c34a
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
May 18, 2024
c3108a5
Adding options sin_cos_range_tolerance and keep_beyond_sin_cos_range …
toadlover May 28, 2024
44c12ad
Adjusting definitions of sin_cos_range and in_sin_cos_range to allow …
toadlover May 28, 2024
dd57462
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
May 28, 2024
f3ecfee
fixing declaration of Bool to Boolean
toadlover May 28, 2024
2c00d01
batcherge branch 'updated_ligand_discovery_search_code_ag_may_2024' o…
May 28, 2024
290bb91
Reverting option changes
toadlover May 28, 2024
fd35f48
Using tolerance value of 0.05 in call to sin_cos_range in rotation_ax…
toadlover May 28, 2024
fe7acc7
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
May 28, 2024
6936053
removing added options that are no longer being used
toadlover May 28, 2024
c6b510c
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
May 28, 2024
cb143b3
Adjusting sin_cos_range to no longer fail if the calculation is outsi…
toadlover May 30, 2024
5e72171
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
May 30, 2024
8ff67fb
Removing tolerance pass of 0.05 for sin_cos_range. Passing the value …
toadlover May 30, 2024
d366248
batch comp
Jun 14, 2024
0c0e272
Adding code to ensure that working_pose_ resets each iteration
toadlover Jun 14, 2024
eb8c2bb
batch comp
Jun 14, 2024
1b22bc4
Writing new residues to original pose as well as working_pose_
toadlover Jun 14, 2024
80c2231
batch comp
Jun 14, 2024
26b09c8
Initial code change to clean file names and move placement data into …
toadlover Jun 24, 2024
fa421f8
Adding option clean_pdb_name so that pdbs from liganddiscoverysearch …
toadlover Jun 24, 2024
4dac60b
erge branch 'updated_ligand_discovery_search_code_ag_may_2024' of htt…
Jun 24, 2024
013552f
Fix missing semicolon and importing package to add comments
toadlover Jun 24, 2024
ee2cec6
batch comp
Jun 24, 2024
cb80073
Forgot to dereference calls to working_pose_ in comments
toadlover Jun 24, 2024
fea8d8f
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 24, 2024
31b3962
Update LigandDiscoverySearch.cc
toadlover Jun 24, 2024
cef0741
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 24, 2024
6cd56a0
Update LigandDiscoverySearch.cc
toadlover Jun 24, 2024
4b7d4bf
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 24, 2024
2cea47d
Adjusting add_comment keys so that they are better lustered together
toadlover Jun 24, 2024
ea64304
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 24, 2024
eaee896
forgot to wrap comment statement in if
toadlover Jun 24, 2024
91700a2
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 24, 2024
669d1a5
Adding code to include a simplified table of data to the printed pdbs…
toadlover Jun 25, 2024
177bbdb
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 25, 2024
1b9fc59
Adding missing semicolon
toadlover Jun 25, 2024
efbf602
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 25, 2024
101e291
Adding extra table entry for the file name
toadlover Jun 25, 2024
c502e94
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 25, 2024
2a7dbfa
removing extraneous comma in table between pdb name and ligand name
toadlover Jun 25, 2024
3f251ba
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Jun 25, 2024
f549675
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 17, 2024
c1c538d
condensing declaration of discovery_position vector to be directly read
toadlover Sep 17, 2024
f18a85f
queue -A abgvg9
Sep 17, 2024
fe66a44
addressing bad tracer name and removing a lot of unecessary commented
toadlover Sep 17, 2024
478f6d8
removing bad and unecessarily call to xml file that is not useful to the
toadlover Sep 17, 2024
17e27e0
removing extraneous parentheses
toadlover Sep 17, 2024
f6726b2
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 17, 2024
726b086
potential fix to casting issue where protein_discovery_locus argument
toadlover Sep 17, 2024
117c590
currently reverting the change in this script, because I can not find an
toadlover Sep 17, 2024
e178a79
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 17, 2024
2cf75d3
adding potential fix to iteratively add each value from the discovery
toadlover Sep 17, 2024
84a96e9
forgot to declare the data type
toadlover Sep 17, 2024
a613359
batch comp
Sep 18, 2024
568ab32
declared variables as constant in function calls when called by
toadlover Sep 18, 2024
bfb708b
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 18, 2024
6e45b39
fixing inconsistent const between cc and hh files
toadlover Sep 18, 2024
107eeaf
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 18, 2024
13858d4
changed all pose copy instances to copy while using the clone function
toadlover Sep 18, 2024
2b6bea2
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 18, 2024
733cf60
fixing usage of clone function to be called before making a pointer of
toadlover Sep 18, 2024
dece205
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 18, 2024
6af7da9
attempt to correct syntax for creating the clone of the poses (clone
toadlover Sep 18, 2024
baee780
removing old commented code that is not necessary to aid with
toadlover Sep 18, 2024
b21a285
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 18, 2024
41f7bf1
initial attempt at using typedef to condense the length of the type of
toadlover Sep 18, 2024
e92375d
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 18, 2024
dfdd2ab
fixing type in cc file and removing commented code from hh file
toadlover Sep 18, 2024
3cc8994
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 19, 2024
8bf8188
initial attempt to utilize utility/Binary_Util.code_to_6bit and utilize
toadlover Sep 19, 2024
e893cab
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 19, 2024
f9e815b
fixing syntax of calling the code_to_6bit
toadlover Sep 19, 2024
3adca5d
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 19, 2024
269df4c
syntax fix to deal with that the function return is a character and it
toadlover Sep 19, 2024
b4bfc35
Cleaning up removed code from updating to use code_to_6bit
toadlover Sep 19, 2024
832b19f
using typedef to create simplified shorthand for space fill matrices and
toadlover Sep 20, 2024
aa64dd5
fixing syntax for calling SpaceFillMatrix as return type in
toadlover Sep 20, 2024
c748cec
changing working_positinos iteration loop to be range based instead of
toadlover Sep 20, 2024
5dd8ff7
converting some for loops that iterate over .size() indexing to beign
toadlover Sep 20, 2024
d2af695
adjusted another for loop and revered loop that used
toadlover Sep 20, 2024
06ce990
Removing working_position_ class variable is it is now replaced by
toadlover Sep 20, 2024
6f78ba3
adjusting create_protein_representation_matrix_space_fill function to
toadlover Sep 20, 2024
dbc2c32
I forgot to fix the function call
toadlover Sep 20, 2024
e7f6938
improving handling of kill_bad_init where working_pose_ could call a
toadlover Sep 20, 2024
25be92f
addressing how dist_threshold and angl_threshold were used in discover
toadlover Sep 23, 2024
0d09536
Fixing how Real is called in hh
toadlover Sep 23, 2024
c83b436
Adding additional reasoning for why I am initially blanking the score
toadlover Sep 23, 2024
7ae6430
Overhauling tracer verbosity. Removing verbose option and its usage
toadlover Sep 23, 2024
0fd0f0a
Migrating code used to set up score functions used in discover() into
toadlover Sep 24, 2024
8af9af2
adding scorefunctionfactory hh (not .fwd.hh, which is already present)
toadlover Sep 24, 2024
c0245ff
fixing namespace syntax
toadlover Sep 24, 2024
bd46198
moving initial seeding of class score functions to constructors. I also
toadlover Sep 24, 2024
9687a38
tryingto fix syntax for score function creation
toadlover Sep 24, 2024
60559ab
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
7f85ebe
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
65c1a58
adding debug statement to help troubleshoot working_positions_ size
toadlover Sep 24, 2024
5f72fdb
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
d4a168a
tracer to help figure out why I am losing the protein_discovery_locus
toadlover Sep 24, 2024
3e3697a
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
07ad0db
adjusting usage of protein_discovery_locus input option to try to get
toadlover Sep 24, 2024
3b32e92
removing debug statement that is included in the app and for some
toadlover Sep 24, 2024
487dfb6
Cleaning definition of ligand_atom_trios. Data type is now cleaned in a
toadlover Sep 24, 2024
b29fa7b
fixing new function by having atom type set get passed in that it needs
toadlover Sep 24, 2024
adce85f
specifying source of atom_trios to be
toadlover Sep 24, 2024
01b7b13
fixing declaration of hash motif library function in hh
toadlover Sep 24, 2024
23f69d8
getting rid of the print of discovery_positions_int in app because the
toadlover Sep 24, 2024
937b9e4
adjusting named of tracers in code to put a period between
toadlover Sep 24, 2024
48aeb41
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
91cefde
condensing minipose generation code into a function to help
toadlover Sep 24, 2024
7430e30
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
5b9801a
I forgot to include ligresOP in the make_minipose function
toadlover Sep 24, 2024
dd0ea14
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
54e4523
large overhaul, moving the placement scoring into its own function as
toadlover Sep 24, 2024
6db38ae
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
886ef06
I forgot to define the function in the hh file. I also updated the
toadlover Sep 24, 2024
92f2535
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
41fcf79
fixed typo
toadlover Sep 24, 2024
4d573cf
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 24, 2024
b4cd960
handling delta_score and clashing_counter, which are variables that are
toadlover Sep 24, 2024
67e7791
reverting changes back to before trying to move scoring into its own
toadlover Sep 24, 2024
836a0c4
removing angl_threshold and distance_threshold variables, which were
toadlover Sep 25, 2024
15b9842
substantial change, initial step towards making all cutoff values as
toadlover Sep 25, 2024
b41625e
implementing change of cutoff class variables into their proper
toadlover Sep 25, 2024
e1a080e
recent fixed made setting up sfcore functions convoluted. Cleaning that
toadlover Sep 25, 2024
956f6fb
removing seed function from hh
toadlover Sep 25, 2024
8eb232e
implementing score_minipose function to excise scoring of the minipose
toadlover Sep 25, 2024
d9c4000
fixing syntax of score_minipose call for minipose poseOP object (and
toadlover Sep 25, 2024
55d1d46
compartmentalizing creation of working pose constraint set into
toadlover Sep 25, 2024
ddd55ce
I forgot to include working_position in the function to apply
toadlover Sep 25, 2024
eb2fa1f
fixing constraint function because I forgot to add ligresOP to it. More
toadlover Sep 25, 2024
5e3d168
forgot the semicolon...
toadlover Sep 25, 2024
865e384
also fixing syntax
toadlover Sep 25, 2024
2bbbe34
rearrangign order that we start to set up ligand areas for highresdock
toadlover Sep 25, 2024
aaa7b88
adding function to add the ligand mrt to the working and original poses
toadlover Sep 25, 2024
1ff41d4
fixin the original write of working_pose to original_pose
toadlover Sep 25, 2024
c5a250c
fixing making pointers and dereferencing
toadlover Sep 25, 2024
20f5e39
compartmentalizing use and creation of highresdock into new functions
toadlover Sep 25, 2024
6b361b6
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 25, 2024
0433711
fixing variable name in making HRD function
toadlover Sep 25, 2024
a9f3df9
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 25, 2024
3d3e294
cleaning the code that resets working_pose_ after either succeeding or
toadlover Sep 25, 2024
a3985c9
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 25, 2024
81430b4
doing some cleaning
toadlover Sep 25, 2024
e354e5a
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
Sep 25, 2024
d6467d6
ran beautifier on these scripts
Sep 25, 2024
cf6ac52
beautifying the lds app, which I guess just wasn't mentioned in a pr…
Sep 25, 2024
cdff92d
including pose.hh in lds hh file (it was missing, and the test server
toadlover Sep 25, 2024
ad64dee
Merge branch 'updated_ligand_discovery_search_code_ag_may_2024' of ht…
toadlover Sep 25, 2024
874b904
moving hash_motif_library_into_map() and motif_atoms typedef to
toadlover Oct 3, 2024
ad8af88
fixing syntax
toadlover Oct 3, 2024
5ecca6b
fixing variable usage
toadlover Oct 3, 2024
6a070a6
substantial update that moves the placed ligand motif collection code
toadlover Oct 4, 2024
7ae5121
incliding motif_utils.hh to the ILM.hh file since it uses the
toadlover Oct 4, 2024
ba0bf0a
missing semicolon
toadlover Oct 4, 2024
96c1434
adding extra_pose_info_util to ILM.cc so that it can utilize
toadlover Oct 4, 2024
1936c5c
fixing old variable conventions. Also making mymap pass into
toadlover Oct 4, 2024
e805eb7
fixing location of funal return statement to be in correct location
toadlover Oct 4, 2024
cf3753c
quality_check wants pdb_name in function declaration to be passed by
toadlover Oct 4, 2024
6e619ab
getting rid of unused tracer declared in headers of app
toadlover Oct 4, 2024
fae98dd
adding some debug lines in ILM and also potentially fixed a bug in bad
toadlover Oct 4, 2024
e6fd9c9
fixing syntax for calling string in argument
toadlover Oct 4, 2024
07f4ce7
adding additinoal tracing to resolve an issue
toadlover Oct 4, 2024
d9d1c2f
adding additional debug statements to help figure out where bad pointer
toadlover Oct 4, 2024
34ab955
seeing if passing mymap in by reference fixes the bad allocation issue
toadlover Oct 4, 2024
fe16f63
seeing if passing working_pose pointer by value will potentially
toadlover Oct 4, 2024
7a32b19
reverting mymap to be passed by value
toadlover Oct 4, 2024
e18283a
temporarily commenting out add_comment lines to see if they are causing
toadlover Oct 4, 2024
ac9873c
ng commented add_comment lines and adding a temporary return towards the
toadlover Oct 4, 2024
d49ce8c
moving return statement further up before process_fot_motifs
toadlover Oct 4, 2024
3153352
it seems that process_for_motifs is causing the pointer allocation
toadlover Oct 4, 2024
359ab1a
fixing typo
toadlover Oct 4, 2024
702ef2a
till broken, trying more return statements Please enter the commit me…
toadlover Oct 4, 2024
c6ad9fb
removing one temporary return statement
toadlover Oct 4, 2024
e4a5de9
moving return statement down to try to figure out where the memory
toadlover Oct 4, 2024
6199680
adjusting return statement again
toadlover Oct 4, 2024
9bb69d7
moving return statement again
toadlover Oct 4, 2024
97ef238
adding temporary debug statements
toadlover Oct 4, 2024
b7ac9f6
anging how prot_pos_that_made_motifs is seeded and moving away from
toadlover Oct 4, 2024
73b9d7d
potential fix to memory allocation issue that occurs in
toadlover Oct 7, 2024
bb57447
forgot to dereference pose
toadlover Oct 7, 2024
687314e
fixing typo
toadlover Oct 7, 2024
da1d0d6
reverting the use of a dereferenced pose, as that did not resolve the
toadlover Oct 7, 2024
4c7ea83
adding additional debug statement
toadlover Oct 7, 2024
ec90921
rearranging lines in a way to help debug
toadlover Oct 7, 2024
a4f7a7c
adding debug statement to make sure that we finish process_for_motifs
toadlover Oct 7, 2024
e090cf3
in process_for_motifs, adjusting how it works so that instead of
toadlover Oct 7, 2024
5938908
adjusting logic of ligand_to_residue_analysis so that it now returns a
toadlover Oct 7, 2024
cc9dbfe
correcting additional return statements
toadlover Oct 7, 2024
b8e0abc
fixing return
toadlover Oct 7, 2024
be4d61e
fixing print statement for debugging
toadlover Oct 7, 2024
7b7d1cc
using class library variable in call to process_for_motifs instead of a
toadlover Oct 7, 2024
eb843d3
test print
toadlover Oct 7, 2024
6a5453c
variable name fix
toadlover Oct 7, 2024
2662c31
adding additional debugging
toadlover Oct 7, 2024
e278b9f
adjusting loop
toadlover Oct 7, 2024
73a4c90
I may finally have a fix, it looks like using auto to iterate over the
toadlover Oct 7, 2024
c89c432
removing premature return statement and removing a debug loop that uses
toadlover Oct 7, 2024
350ad3b
reverting some auto loops on vectors back to iterating over size to see
toadlover Oct 7, 2024
3f41c17
fixing variable issue
toadlover Oct 7, 2024
3b74762
I think I finally fixed the issue, it was bad indexing
toadlover Oct 7, 2024
6047b2f
fixing bad indexing in LDS.cc as well
toadlover Oct 7, 2024
7e1155e
cleaning code and tracer statements
toadlover Oct 7, 2024
3d9f42a
cleaning up for loops to convert to be range (instead of iterative)
toadlover Oct 7, 2024
84ea0bc
a little cleanup as well as submiting initial build of
toadlover Oct 7, 2024
7f55d11
Reverting loop over motif_indices_list to iterate by index number and
toadlover Oct 9, 2024
52fe689
Adding a comment to the code to explain the reasoning of the last commit
toadlover Oct 9, 2024
324d594
removing loose semicolon
toadlover Oct 9, 2024
8df3f07
fixing namespace and include usage
toadlover Oct 9, 2024
a48246c
trying to fix option intake
toadlover Oct 9, 2024
f91d675
including xyzvector since the app uses those
toadlover Oct 9, 2024
109e2bc
including vector1, not xyzvector
toadlover Oct 9, 2024
1e96b24
I forgot to save the vector1 change...
toadlover Oct 9, 2024
616f39a
fixing namespace issues
toadlover Oct 9, 2024
bd5cf96
adding string utilities
toadlover Oct 9, 2024
3b2f3f5
adding more includes that should hopefully fix
toadlover Oct 9, 2024
1f60bfa
fixed call to wrong variable
toadlover Oct 9, 2024
2bc9ede
adding some debugging lines to help troubleshoot
toadlover Oct 11, 2024
0e426e3
forgot to dereference filename
toadlover Oct 11, 2024
e0edeab
adding additinoal tracing lines to try to figure out the issue
toadlover Oct 11, 2024
2f9b9a4
removing a not super useful tracer
toadlover Oct 11, 2024
2646d71
adding debugging lines for the real motif check
toadlover Oct 11, 2024
04aac09
adding additional debugging to figure out why the motif library seems
toadlover Oct 11, 2024
1a5c341
reverting loop logic over cur_trip because I think this may be the
toadlover Oct 11, 2024
f83cf3f
making a new motif_library to be used in evaluate_motifs_of_pose as
toadlover Oct 11, 2024
66db62f
missing semicolon
toadlover Oct 11, 2024
7bd5ec6
sanity check to try to figure out why we may not be getting
toadlover Oct 11, 2024
a3327d8
adding another sanity check to make sure that we are actually getting
toadlover Oct 11, 2024
89e9b02
additional debug line because it looks like the ligand atom types are
toadlover Oct 11, 2024
a811698
I think I finallyfixed the bug where bad values were being pushed
toadlover Oct 11, 2024
f0c3e29
this also looks like it should fix things
toadlover Oct 11, 2024
7f23c9a
fixing indexing error for accessing placement data vector
toadlover Oct 11, 2024
f9e921a
fixing data type of vector that gets set by evaluate function# Pleas…
toadlover Oct 11, 2024
a3052e1
fixing type of other vector
toadlover Oct 11, 2024
05d7cfe
adjusting app so that it won't overwrite the input files
toadlover Oct 15, 2024
ab218f9
Please enter the commit message for your changes. Lines starting
Oct 15, 2024
10ed978
fixing syntax error
toadlover Oct 15, 2024
db8a273
beautifying ugly scripts
Oct 15, 2024
9027c18
updating ligand discovery search integration test to work. Also
toadlover Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/src/apps.src.settings
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ sources = {
"enzyme_design",
],
"public/motif_ligand_discovery": [
"determine_real_motifs",
"identify_ligand_motifs",
"ligand_discovery_search_protocol",
"remove_duplicate_motifs",
],
"public/pose_sewing": [
"MakeSegmentFile"
Expand Down
151 changes: 151 additions & 0 deletions source/src/apps/public/motif_ligand_discovery/determine_real_motifs.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
// (c) addressed to University of Washington CoMotion, email: [email protected].

/// @file
/// @brief

// libRosetta headers
#include <basic/options/keys/in.OptionKeys.gen.hh>

#include <sstream>
#include <string>

#include <devel/init.hh>
#include <utility/excn/Exceptions.hh>
#include <utility/string_util.hh>

#include <protocols/motifs/IdentifyLigandMotifs.fwd.hh>
#include <protocols/motifs/IdentifyLigandMotifs.hh>
#include <protocols/motifs/Motif.hh>
#include <protocols/motifs/MotifLibrary.hh>
#include <protocols/motifs/motif_utils.hh>

#include <core/io/pdb/pdb_writer.hh> // pose_from_pdb
#include <core/pose/Pose.hh>

#include <basic/Tracer.hh>

#include <core/import_pose/import_pose.hh> // Need since refactor

#include <basic/options/option.hh>

// C++ headers
//#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility/io/ozstream.hh>
#include <utility/file/FileName.hh>
#include <utility/file/file_sys_util.hh> // file_exists
#include <utility/vector1.hh>

// Time profiling header
#include <time.h>

using namespace core;
//using namespace ObjexxFCL;
using namespace pose;
//using namespace chemical;
using namespace scoring;
//using namespace optimization;
using namespace basic;
using namespace options;
using namespace OptionKeys;

using utility::string_split;
using utility::vector1;

int
main( int argc, char * argv [] )
{
try {
static basic::Tracer ms_tr( "determine_real_motifs", basic::t_info );



devel::init( argc, argv ); // reading options--name should be more descriptive

//load in pdb(s)

ms_tr << "Making Pose of input pdb file(s)" << std::endl;

typedef vector1< utility::file::FileName > Filenames;
Filenames pdbnames;

//borrowing code from motif_ligand_packer_design.cc to take in a single or multiple pdb files (using -l or -s flags), and be able to iterate discovery upon all files
if ( option[ in::file::l ].user() ) {
Filenames listnames( option[ in::file::l ]().vector() );
for ( Filenames::const_iterator filename( listnames.begin() );
filename != listnames.end(); ++filename ) {
std::ifstream list( (*filename).name().c_str() );
while ( list ) {
std::string pdbname;
list >> pdbname;
pdbnames.push_back( pdbname );
}
}

} else if ( option[ in::file::s ].user() ) {
pdbnames = option[ in::file::s ]().vector();

} else {
std::cerr << "No files given: Use either -file:s or -file:l "
<< "to designate a single pdb or a list of pdbs"
<< std::endl;
}

//read in the compare library of motifs (presummably real motifs)
//create a vector that only stores the identity of the atoms in the ligand (not their index value); this vector will be empty, but is necessary to call wanted versions of overloaded function to loading in the library
//version if we don't use this empty vector has potential to terminate the read of motifs early if a single bad motif is read in, this version ditches the bad motif and keeps reading
utility::vector1< std::string > ligand_atom_names;
bool check_for_bad_motifs = true;
protocols::motifs::MotifLibrary real_motifs( protocols::motifs::get_LigandMotifLibrary_user(check_for_bad_motifs, ligand_atom_names) );
protocols::motifs::MotifCOPs real_motifcops = real_motifs.library();
ms_tr << "Collected motifs library with " << real_motifcops.size() << " motifs. " << std::endl;

//hash the library by residue and atoms
std::map<protocols::motifs::motif_atoms,protocols::motifs::MotifCOPs> hashed_real_library;
protocols::motifs::hash_motif_library_into_map(real_motifcops,hashed_real_library);

//create and use IdentifyLigandMotifs
IdentifyLigandMotifs ilm;

//iterate through all pdb files and run the real motif check
for ( Filenames::const_iterator filename( pdbnames.begin() ); filename != pdbnames.end(); ++filename ) {

if ( !utility::file::file_exists( *filename ) ) {
ms_tr << "WARNING! " << *filename << " does not exist!" << std::endl;
continue;
}

//get pdb name prefix for outputs:
//strip path and file type
std::string pdbprefix( string_split( string_split( *filename, '/' ).back(), '.' ).front() );

ms_tr << "On file " << *filename << " with pdb prefix of " << pdbprefix << std::endl;

//import pose from pdb
pose::Pose pose_pointer_helper;
core::import_pose::pose_from_file( pose_pointer_helper, *filename , core::import_pose::PDB_file);
pose::PoseOP pose(new pose::Pose(pose_pointer_helper));

//run evaluate_motifs_of_pose() on the pose
ilm.evaluate_motifs_of_pose(pose, hashed_real_library, pdbprefix);

//dump the pose to a pdb file and append _real_motif_data to the name so that the original is not overwriten
core::io::pdb::dump_pdb(*pose, pdbprefix + "_real_motif_data.pdb");
}

} catch (utility::excn::Exception const & e ) {
e.display();
return -1;
}
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ main( int argc, char * argv [] )
//create and use IdentifyLigandMotifs
IdentifyLigandMotifs ilm;
//create MotifLibrary to hold motif library that ILM will generate
//protocols::motifs::MotifLibrary motifs = ilm.process_file_list();

ilm.process_file_list();
ilm.write_motifs_to_disk();
} catch (utility::excn::Exception const & e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ using namespace protocols::dna;

#include <basic/prof.hh>
#include <basic/Tracer.hh>
static basic::Tracer TR( "apps.pilot.motif_dna_packer_design" );

#include <core/import_pose/import_pose.hh> // Need since refactor

Expand All @@ -73,10 +72,8 @@ static basic::Tracer TR( "apps.pilot.motif_dna_packer_design" );
#include <utility/file/file_sys_util.hh> // file_exists
#include <utility/file/FileName.hh>
#include <utility/vector1.hh>
using utility::vector1;
#include <utility/string_util.hh>
#include <utility/excn/Exceptions.hh>
using utility::string_split;

// c++ headers
#include <fstream>
Expand Down Expand Up @@ -137,6 +134,8 @@ using namespace chemical;
using namespace pack;
using namespace task;
using namespace scoring;
using utility::string_split;
using utility::vector1;

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -240,7 +239,18 @@ main( int argc, char * argv [] )
pose::PoseOP pose(new pose::Pose(pose_pointer_helper));

//get discovery position
core::Size discovery_position = option[ OptionKeys::motifs::protein_discovery_locus ];
//core::Size discovery_position = option[ OptionKeys::motifs::protein_discovery_locus ];
//now using a vector instead of a single core::Size value
//read as int and then convert to core::Size
//utility::vector1<int> discovery_position_int = option[ OptionKeys::motifs::protein_discovery_locus ];
utility::vector1<core::Size> discovery_position;

utility::vector1<core::Size> discovery_positions_int = option[ OptionKeys::motifs::protein_discovery_locus ]();

//iteratively append discovery positions to the discovery_position vector
for ( const auto & position : discovery_positions_int ) {
discovery_position.push_back(position);
}

//declare LigandDiscoverySearch object
ms_tr << "Making LigandDiscoverySearch object" << std::endl;
Expand Down
Loading