shanilpanara / origamiUROP

Autonomous Generation of DNA Origami Nanostructures - Summer Project
GNU General Public License v3.0
1 stars 3 forks source link

Add transform method to Nucleotide #57

Open debeshmandal opened 4 years ago

debeshmandal commented 4 years ago

Nucleotide should be able to accept a 4x4 matrix to translate, transform it. The function should look something like this:

class Nucleotide:
...
def transform(matrix: np.ndarray):
        self.pos_com = np.matmul(matrix, self.pos_com)
        ...
    return

Another thing that can be done is creating an Abstract Class called Transformable that Polygon and Nucleotide classes can subclass, to ensure there is no copy and pasting of transformation methods