-
Notifications
You must be signed in to change notification settings - Fork 7
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
oxDNA Export with Helix Group Pitch / Yaw Bug #249
Comments
Here's a minimal reproducible example: import scadnano as sc
def create_design() -> sc.Design:
helices = [sc.Helix(max_offset=100) for _ in range(2)]
design = sc.Design(helices=helices, grid=sc.square)
design.groups[sc.default_group_name].pitch = 45
design.draw_strand(0, 0).to(21)
design.draw_strand(1, 0).to(21)
return design
if __name__ == '__main__':
d = create_design()
d.write_scadnano_file(directory='output_designs')
d.write_oxdna_files(directory='oxdna') This makes this scadnano file: oxdna_export_with_pitch.zip Here is how the exported oxDNA files appear: Whereas with Here they are superimposed on top of each other: Here's another example, this time with length-42 strands instead of length-21: This gives a clue to the problem: it appears that the center of the strand, rather than the 5' end, is being placed at the origin. (Actually even that's not totally accurate: the origin of the whole system seems to be midway between the centers of the two strands.) Furthermore, each individual helix is being rotated around that point, rather than the shared origin of the whole HelixGroup. |
I'm a bit confused actually. If you inspect the So this seems like a combination of expected behaviors from both oxView and scadnano:
|
I see one source of the problem. In the function position = position + group.position In other words, it is accounting for the fact that the group's position needs to be added to the position of the individual helix. However, it does not account for the fact that rotating the whole HelixGroup around an axis would also shift the position of any helix whose position was not at the origin. For example, if a helix had position (x=0, y=1, z=0), i.e., it lies 1 nm below the origin in the views above (where positive y goes down), then rotating the whole HelixGroup 90 degrees clockwise means its new position should be (x=0, y=0, z=-1). (i.e., the vector pointing from the origin to the helix goes from pointing straight down to pointing straight left.) |
Hello,
There seems to be a bug where when you apply pitch / yaw to a helix group and export to oxDNA format, the cross-section of the structure gets directionally skewed. This is best seen in the image below where on the left there is no pitch / yaw and the honeycomb lattice looks as expected. However on the right is when 60 degrees of pitch was assigned to the helix group that there are two issues: 1) the 6HB loses the cross-sectional shape and the helices overlap one another and 2) each strand within the bundle is now starting at a different position in space (depth)
If you want to see the issue / see a Python script that generates the malformed structure let me know and I can share the script or setup a Zoom call to screen share!
The text was updated successfully, but these errors were encountered: