Skip to content

Commit

Permalink
Reading custom bases with NA interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
eryykr committed Sep 20, 2024
1 parent 7eff338 commit c1174f2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Interactions/DRHInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,16 @@ void DRHInteraction::allocate_particles(std::vector<BaseParticle*> &particles) {
}
}

int N_in_strand = sequence.size();
//Needed here to read custom bases
std::vector<int> btypes;
try {
btypes = Utils::btypes_from_sequence(sequence);
}
catch(oxDNAException &e) {
throw oxDNAException("topology file, strand %d (line %d): %s", ns, ns + 1, e.what());
}

int N_in_strand = btypes.size();
for(int i = 0; i < N_in_strand; i++, current_idx++) {
if(current_idx == parser.N()) {
throw oxDNAException("Too many particles found in the topology file (should be %d), aborting", parser.N());
Expand Down

0 comments on commit c1174f2

Please sign in to comment.