Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions source/src/core/io/pose_from_sfr/PoseFromSFRBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,9 @@ void PoseFromSFRBuilder::build_initial_pose( pose::Pose & pose )

residues.push_back( ii_rsd );
jump_connections.push_back( root_index );
if ( residues.size() > 1 ) {
chain_endings.push_back( residues.size() - 1 );
}

} else { // Append residue to current chain dependent on bond length.
if ( ! options_.missing_dens_as_jump() ) {
Expand Down Expand Up @@ -1231,6 +1234,7 @@ void PoseFromSFRBuilder::build_initial_pose( pose::Pose & pose )

residues.push_back( ii_rsd );
jump_connections.push_back( old_nres );
// Keep this in the same chain -- no chain ending.


} else {
Expand Down Expand Up @@ -1263,10 +1267,6 @@ void PoseFromSFRBuilder::build_initial_pose( pose::Pose & pose )
pose_to_rinfo_.push_back( ii );
pose_temps_.push_back( rinfos_[ ii ].temps() );

// Update the pose-internal chain label if necessary.
if ( ( is_lower_terminus_[ ii ] || ! determine_check_Ntermini_for_this_chain( rinfos_[ ii ].chainID() ) ) && residues.size() > 1 ) {
chain_endings.push_back( residues.size() - 1 );
}
}

// Now actually append all the residues
Expand Down
1 change: 1 addition & 0 deletions source/test/core.test.settings
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ testinputfiles = [
"io/pose_from_sfr/ace_from_1VDN.pdb",
"io/pose_from_sfr/acetylated_and_methylated_alanine.pdb",
"io/pose_from_sfr/cyclic_pep_with_link.pdb",
"io/pose_from_sfr/cycle_chain_test.pdb",
"io/pose_from_sfr/1rgr_apo.pdb",
"io/pose_from_sfr/1IJ3_cleaned.pdb",
"io/pose_to_sfr/2_peptides_2_glycan_ligands.pdb",
Expand Down
15 changes: 15 additions & 0 deletions source/test/core/io/pose_from_sfr/PoseFromSFRBuilder.cxxtest.hh
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ public:
TS_ASSERT( pose->residue(pose->total_residue()).connected_residue_at_upper() == 1 );
}

/// @brief This tests for proper chain separation when you have a cyclic peptide after a regular one.
/// There was a bug where the peptide cycle was counted as "part of" the previous chain,
/// due to the lack of being "terminal"
void test_read_cyclic_peptide_chain_ending() {
core::pose::PoseOP pose( core::import_pose::pose_from_file( "core/io/pose_from_sfr/cycle_chain_test.pdb", false ) );
TS_ASSERT_EQUALS( pose->size(), 5 );
TR << "cycle_chain_test.pdb sequence: " << pose->annotated_sequence() << std::endl;
TS_ASSERT( pose->residue(2).is_upper_terminus() );
TS_ASSERT( !pose->residue(3).is_lower_terminus() );
TS_ASSERT( !pose->residue(5).is_upper_terminus() );
TS_ASSERT_EQUALS( pose->residue(3).connected_residue_at_lower(), 5 );
TS_ASSERT_EQUALS( pose->residue(5).connected_residue_at_upper(), 3 );
TS_ASSERT_EQUALS( pose->num_chains(), 2 );
}

/// @brief Test that we can correctly read poses without adding termini to user-specified chains.
/// @author Vikram K. Mulligan ([email protected]).
void test_read_pose_without_terminal_variant_types() {
Expand Down
86 changes: 86 additions & 0 deletions source/test/core/io/pose_from_sfr/cycle_chain_test.pdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
LINK N ARG B 304 C ALA B 306 1.35
ATOM 4888 N CYS A 302 124.240 127.763 155.412 1.00 0.00 N
ATOM 4889 CA CYS A 302 125.068 127.591 156.591 1.00 0.00 C
ATOM 4890 C CYS A 302 124.803 128.755 157.559 1.00 0.00 C
ATOM 4891 O CYS A 302 125.504 129.749 157.358 1.00 0.00 O
ATOM 4892 CB CYS A 302 126.549 127.545 156.217 1.00 0.00 C
ATOM 4893 SG CYS A 302 127.659 127.297 157.624 1.00 0.00 S
ATOM 4894 H CYS A 302 123.880 128.693 155.260 1.00 0.00 H
ATOM 4895 HA CYS A 302 124.828 126.637 157.048 1.00 0.00 H
ATOM 4896 1HB CYS A 302 126.721 126.737 155.506 1.00 0.00 H
ATOM 4897 2HB CYS A 302 126.830 128.477 155.727 1.00 0.00 H
ATOM 4898 HG CYS A 302 127.024 128.123 158.450 1.00 0.00 H
ATOM 4899 N GLN A 303 124.535 128.417 158.826 1.00 0.00 N
ATOM 4900 CA GLN A 303 124.536 127.021 159.280 1.00 0.00 C
ATOM 4901 C GLN A 303 123.267 126.269 158.883 1.00 0.00 C
ATOM 4902 O GLN A 303 122.182 126.566 159.381 1.00 0.00 O
ATOM 4903 OXT GLN A 303 123.362 125.266 158.177 1.00 0.00 O
ATOM 4904 CB GLN A 303 124.711 126.959 160.799 1.00 0.00 C
ATOM 4905 CG GLN A 303 124.855 125.552 161.353 1.00 0.00 C
ATOM 4906 CD GLN A 303 125.128 125.543 162.845 1.00 0.00 C
ATOM 4907 OE1 GLN A 303 125.018 126.571 163.518 1.00 0.00 O
ATOM 4908 NE2 GLN A 303 125.489 124.378 163.372 1.00 0.00 N
ATOM 4909 H GLN A 303 123.733 128.950 159.165 1.00 0.00 H
ATOM 4910 HA GLN A 303 125.386 126.514 158.824 1.00 0.00 H
ATOM 4911 1HB GLN A 303 125.595 127.526 161.087 1.00 0.00 H
ATOM 4912 2HB GLN A 303 123.852 127.425 161.284 1.00 0.00 H
ATOM 4913 1HG GLN A 303 123.930 125.004 161.173 1.00 0.00 H
ATOM 4914 2HG GLN A 303 125.686 125.058 160.851 1.00 0.00 H
ATOM 4915 1HE2 GLN A 303 125.681 124.309 164.352 1.00 0.00 H
ATOM 4916 2HE2 GLN A 303 125.566 123.567 162.791 1.00 0.00 H
TER
ATOM 4918 N ARG B 304 156.718 110.241 143.432 1.00 0.00 N
ATOM 4919 CA ARG B 304 155.819 109.548 142.520 1.00 0.00 C
ATOM 4920 C ARG B 304 155.287 108.243 143.101 1.00 0.00 C
ATOM 4921 O ARG B 304 154.079 108.074 143.270 1.00 0.00 O
ATOM 4922 CB ARG B 304 156.529 109.252 141.208 1.00 0.00 C
ATOM 4923 CG ARG B 304 155.803 108.279 140.292 1.00 0.00 C
ATOM 4924 CD ARG B 304 156.693 107.764 139.221 1.00 0.00 C
ATOM 4925 NE ARG B 304 157.739 106.905 139.751 1.00 0.00 N
ATOM 4926 CZ ARG B 304 158.802 106.470 139.047 1.00 0.00 C
ATOM 4927 NH1 ARG B 304 158.945 106.823 137.788 1.00 0.00 N
ATOM 4928 NH2 ARG B 304 159.701 105.690 139.621 1.00 0.00 N
ATOM 4929 HO ARG B 304 157.709 110.048 143.387 1.00 0.00 H
ATOM 4930 HA ARG B 304 154.968 110.201 142.327 1.00 0.00 H
ATOM 4931 1HB ARG B 304 156.671 110.180 140.655 1.00 0.00 H
ATOM 4932 2HB ARG B 304 157.516 108.838 141.412 1.00 0.00 H
ATOM 4933 1HG ARG B 304 155.442 107.431 140.876 1.00 0.00 H
ATOM 4934 2HG ARG B 304 154.956 108.783 139.823 1.00 0.00 H
ATOM 4935 1HD ARG B 304 156.107 107.186 138.507 1.00 0.00 H
ATOM 4936 2HD ARG B 304 157.165 108.601 138.708 1.00 0.00 H
ATOM 4937 HE ARG B 304 157.663 106.612 140.716 1.00 0.00 H
ATOM 4938 1HH1 ARG B 304 158.259 107.419 137.349 1.00 0.00 H
ATOM 4939 2HH1 ARG B 304 159.742 106.498 137.260 1.00 0.00 H
ATOM 4940 1HH2 ARG B 304 159.591 105.419 140.589 1.00 0.00 H
ATOM 4941 2HH2 ARG B 304 160.497 105.365 139.094 1.00 0.00 H
ATOM 4942 N TRP B 305 156.166 107.296 143.419 1.00 0.00 N
ATOM 4943 CA TRP B 305 155.692 106.052 144.029 1.00 0.00 C
ATOM 4944 C TRP B 305 155.568 106.155 145.548 1.00 0.00 C
ATOM 4945 O TRP B 305 156.424 105.667 146.299 1.00 0.00 O
ATOM 4946 CB TRP B 305 156.636 104.901 143.677 1.00 0.00 C
ATOM 4947 CG TRP B 305 156.550 104.475 142.242 1.00 0.00 C
ATOM 4948 CD1 TRP B 305 155.611 104.859 141.332 1.00 0.00 C
ATOM 4949 CD2 TRP B 305 157.444 103.577 141.541 1.00 0.00 C
ATOM 4950 NE1 TRP B 305 155.856 104.264 140.120 1.00 0.00 N
ATOM 4951 CE2 TRP B 305 156.975 103.477 140.229 1.00 0.00 C
ATOM 4952 CE3 TRP B 305 158.588 102.861 141.917 1.00 0.00 C
ATOM 4953 CZ2 TRP B 305 157.607 102.686 139.282 1.00 0.00 C
ATOM 4954 CZ3 TRP B 305 159.223 102.070 140.967 1.00 0.00 C
ATOM 4955 CH2 TRP B 305 158.745 101.985 139.684 1.00 0.00 C
ATOM 4956 H TRP B 305 157.148 107.385 143.195 1.00 0.00 H
ATOM 4957 HA TRP B 305 154.702 105.833 143.627 1.00 0.00 H
ATOM 4958 1HB TRP B 305 157.664 105.197 143.886 1.00 0.00 H
ATOM 4959 2HB TRP B 305 156.409 104.040 144.304 1.00 0.00 H
ATOM 4960 HD1 TRP B 305 154.787 105.539 141.538 1.00 0.00 H
ATOM 4961 HE1 TRP B 305 155.304 104.384 139.283 1.00 0.00 H
ATOM 4962 HE3 TRP B 305 158.973 102.927 142.934 1.00 0.00 H
ATOM 4963 HZ2 TRP B 305 157.243 102.606 138.258 1.00 0.00 H
ATOM 4964 HZ3 TRP B 305 160.112 101.515 141.268 1.00 0.00 H
ATOM 4965 HH2 TRP B 305 159.267 101.355 138.964 1.00 0.00 H
ATOM 4966 N ALA B 306 154.516 106.832 145.982 1.00 0.00 N
ATOM 4967 CA ALA B 306 154.229 107.109 147.360 1.00 0.00 C
ATOM 4968 C ALA B 306 154.087 105.847 148.144 1.00 0.00 C
ATOM 4969 O ALA B 306 153.182 105.010 147.926 1.00 0.00 O
ATOM 4970 CB ALA B 306 153.055 107.999 147.601 1.00 0.00 C
TER
END