-
Notifications
You must be signed in to change notification settings - Fork 74
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
Lanthipeptide and recon multistate design update #263
base: main
Are you sure you want to change the base?
Lanthipeptide and recon multistate design update #263
Conversation
@@ -215,6 +215,10 @@ set_up_lanthionine_constraints( | |||
pose.residue_type(dalares).atom_index("V1"), | |||
dalares | |||
); | |||
AtomID const atom_bb_c( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to run the beautifier prior to merging.
|
||
utility::vector1<std::string> all_pose_sequences (n_procs_); | ||
std::string pass_seq; | ||
for( const std::string& resi_base_name: my_sequence) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rosetta convention is "east const": std::string const &
std::string passed_seq; | ||
passed_seq = utility::receive_string_from_node( ii-1 ); // node ranks are 0-indexed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine this on a single line. (In general, when possible, try to declare variables on the same line you first initialize them.)
std::istringstream iss(passed_seq); | ||
std::string resi_name; | ||
while (iss >> resi_name){ | ||
other_pose_sequences[ii].push_back(resi_name); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's split()
/split_whitespace()
functions in utility/string_util.hh
which does basically this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I use that fxn, is there any way to avoid this awkward passing the output to other_pose_sequences:
utility::vector1std::string split_seq = split_whitespace(passed_seq);
for (std::string const &resi_name : split_seq) {
other_pose_sequences[ii].push_back(resi_name);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to push it one string at a time; you should be able to set other_pose_sequences[ ii ]
directly as the return value from split_whitespace
.
} | ||
return sequence; | ||
} | ||
|
||
/// Based on a list of sequences from poses, get all the AAs present at | ||
/// the position given by position_no | ||
utility::vector1< std::string > | ||
get_candidate_AAs( utility::vector1< std::string > other_pose_sequences, | ||
get_candidate_AAs( utility::vector1< utility::vector1< std::string > > other_pose_sequences, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to pass unchanged vectors by const &
rather than by value -- it saves data copies. (It's a pre-existing issue here, but is exasperated by adding the nesting and larger strings.)
for ( core::Size seqpos: designable_residues ) { | ||
sequence += pose.residue( seqpos ).name1(); | ||
//sequence += pose.residue( seqpos ).name1(); | ||
sequence.push_back(pose.residue_type( seqpos ).base_name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the issues you'll run into here is that it looks like ResidueTypeConstraint takes a string which it compares with the name3()
of the residue types. In general, the base_name()
is not going to be equal to the name3()
. (It is equal for standard residues, but isn't necessarily for noncanonicals and other residues which don't have a simple one letter code -> base_name() correspondence.)
(My recommendation is to either use name3()
here, or add a mode to ResidueTypeConstraint which works on base_name()
.)
Modifications to lanthionine ring parameters to more accurately model the sidechain torsions and the methyl placement for methyllanthionine. Additionally, the recon multistate design code is updated to allow for design with NCAA by switching from a single letter code sequence stored in a string to a vector1 of strings that store the base name of the residue.