Skip to content

Commit

Permalink
fixed bug where strands would sometimes be backwards in converted PDB…
Browse files Browse the repository at this point in the history
…s and fixed bug where the box center was incorrect during inboxing
  • Loading branch information
ErikPoppleton committed May 17, 2024
1 parent 5d08cd5 commit 2f179ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
7 changes: 2 additions & 5 deletions analysis/src/oxDNA_analysis_tools/UTILS/RyeReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,10 @@ def calc_PBC_COM(conf):
cms = calc_PBC_COM(conf)
positions = conf.positions + target - cms
new_poses = coord_in_box(positions)
positions += (new_poses - conf.positions)
#if center:
# cms = np.mean(positions, axis=0)
# positions -= cms

return Configuration(
conf.time, conf.box, conf.energy,
positions, conf.a1s, conf.a3s
new_poses, conf.a1s, conf.a3s
)

####################################################################################
Expand Down
2 changes: 1 addition & 1 deletion analysis/src/oxDNA_analysis_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.3.4'
__version__ = '2.3.5'
14 changes: 10 additions & 4 deletions analysis/src/oxDNA_analysis_tools/oxDNA_PDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,16 @@ def main():
# end residue identifiers
residue_type = ""
if not uniform_residue_names:
if nucleotide == strand.monomers[0] and not strand.is_circular():
residue_type = "3"
elif nucleotide == strand.monomers[-1]:
residue_type = "5"
if strand.is_old():
if nucleotide == strand.monomers[0] and not strand.is_circular():
residue_type = "3"
elif nucleotide == strand.monomers[-1]:
residue_type = "5"
else:
if nucleotide == strand.monomers[0] and not strand.is_circular():
residue_type = "5"
elif nucleotide == strand.monomers[-1]:
residue_type = "3"

nuc_data = {
'pos' : conf.positions[nucleotide.id],
Expand Down

0 comments on commit 2f179ad

Please sign in to comment.