Skip to content
Snippets Groups Projects
Commit 3b0aeb00 authored by whimsial's avatar whimsial
Browse files

Corrected imports. Resolved issue with incorrect coupling region for the aMTs coupling

parent ac5ea85c
Branches
No related tags found
No related merge requests found
Showing
with 393 additions and 48 deletions
# from abaqus import *
# from abaqusConstants import *
# import __main__
# import section
# import regionToolset
# import displayGroupMdbToolset as dgm
# import part
# import material
# import assembly
# import step
# import interaction
# import load
#import mesh
# import optimization
# import job
# import sketch
# import visualization
# import xyPlot
# import displayGroupOdbToolset as dgo
# import connectorBehavior
from LoadCase import Step
from LoadCase import Interaction
from LoadCase import LoadsAndBCs
......
# from abaqus import *
# from abaqusConstants import *
from abaqus import *
from abaqusConstants import *
from LoadCase.InteractionHelpers import (
create_RP, sum_regions, coupling_constraint, attach_spring, pick_region,
couple_nearest_aMTs, find_nearest)
......@@ -11,7 +11,9 @@ from SpindleAssembly.assembly_random import generate_assembly
def create_interactions(**kwargs):
"""
Define all interactions and connections within model
:param kwargs: object
:return: (object) kwargs
"""
MTdata, aMTnames, kwargs = generate_assembly(**kwargs)
......@@ -27,7 +29,9 @@ def create_interactions(**kwargs):
def CoupleIpMTsToSring(**kwargs):
"""
Create distributed elastic spring and couple interpolar microtubules to it
:param kwargs: object
:return: None
"""
spindleLength = kwargs['spindleLength']
......@@ -62,7 +66,9 @@ def CoupleIpMTsToSring(**kwargs):
def CoupleIpMTsToCentrosomes(**kwargs):
"""
Connect and couple interpolar microtubules to centrosomes
:param kwargs: object
:return: None
"""
# Provide coupling constraint parameters
......@@ -95,7 +101,9 @@ def CoupleIpMTsToCentrosomes(**kwargs):
def CoupleAMTs(**kwargs):
"""
Couple astral microtubules with springs
:param kwargs: object
:return: None
"""
regionsRight = []
......@@ -129,7 +137,9 @@ def CoupleAMTs(**kwargs):
def CoupleAMTsToCentrosomes(**kwargs):
"""
Connect astral microtubules to centrosomes
:param kwargs: object
:return: None
"""
# parametyers
......
# import math
# from abaqus import *
# from abaqusConstants import *
# import regionToolset
import math
from abaqus import *
from abaqusConstants import *
import regionToolset
from SpindleAssembly.AddComponents import return_assembly
def create_RP(**kwargs):
"""
Create a reference point
:param kwargs: object
:return: reference point object
"""
a = return_assembly(**kwargs)
......@@ -30,10 +32,15 @@ def create_RP(**kwargs):
def pick_region(verts_index, regionType, collectionName, position, **kwargs):
"""
Pick a region to assign connection
:param regionType: 'vertice', 'edge', 'centrosome' -> defines the type of the picked region
:param collectionName: name of the entity specified by the region
:param position: 'centrosome-right', 'centrosome-left' -> defines to which pole the region belongs
:param kwargs: object
:return: (object) region
"""
a = return_assembly(**kwargs)
......@@ -73,10 +80,15 @@ def pick_region(verts_index, regionType, collectionName, position, **kwargs):
def sum_regions(verts_index, regionType, collectionName, separate='True', **kwargs):
"""
Split a single picked region into a collection of sub-regions
:param regionType: 'vertice', 'edge', 'centrosome' -> defines the type of the picked region
:param collectionName: name of the entity specified by the region
:param separate: 'True' -> separate combined region into right and left sub-regions
:param kwargs: opbject
:return: either combined_region or combined_region_right and combined_region_left
"""
# select a master region
......@@ -102,21 +114,36 @@ def coupling_constraint(region1, region2, influenceRadius, couplingType,
weightingMethod, name, **kwargs):
"""
Create a coupling constraint between two regions
:param region1: Master region
:type region1: object
:param region2: Slave region
:type region2: object
:param influenceRadius: The influence of the master region will be distributed
throughout the subregion in the slave region defined by this radius
:type influenceRadius: float
:param couplingType: Type of coupling is DISTRIBUTED ot STRUCTURAL
:param weightingMethod: Method of averaging the parameters of the coupling
:type weightingMethod: str
:param name: Name of the coupling region
:type name: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -134,17 +161,29 @@ def coupling_constraint(region1, region2, influenceRadius, couplingType,
def attach_spring(region, dof, name, springType='Ground', **kwargs):
"""
Defines a spring object that couples two points or a point to the ground
:param region: Name of the region to which spring is attached
:type region: str
:param dof: Number of DOF associated with the spring.
:type dof: int
:param name: name of the spring connection
:type name: str
:param springType: Type of the spring. Either Ground or Pair
:type springType: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -171,11 +210,17 @@ def attach_spring(region, dof, name, springType='Ground', **kwargs):
def couple_nearest_aMTs(i, **kwargs):
"""
Create a spring-based coupling of pairs of astral microtubules
:param i: Number of aMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
a = return_assembly(**kwargs)
......@@ -200,17 +245,23 @@ def couple_nearest_aMTs(i, **kwargs):
coupling_constraint(regionRP, regionMT, influenceRadius,
couplingType, weightingMethod, name, **kwargs)
refPoint = (r[RPaMT.id],)
return refPoint, regionToolset.Region(referencePoints=refPoint)
return refPoint, regionRP
def find_nearest(position, regions):
"""
Find the astral microtubules that have the closest positions
:param position: (x, y, z) position of the aMT growing end
:type position: tuple
:param regions: Regions that contain nearest aMT ends
:type regions: list of objects
:return: Null
:rtype: Null
"""
d = [math.sqrt((position[i - 1][0] - position[i][0]) ** 2 +
......
# from abaqus import *
# from abaqusConstants import *
from abaqus import *
from abaqusConstants import *
def create_load(**kwargs):
"""
Create and apply compressing load at each growing end of ipMT
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
# Call the current assembly
......@@ -47,9 +51,13 @@ def create_load(**kwargs):
def create_bc(**kwargs):
"""
Fix growing ends of aMTs where they are attached to the membrane
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......
# from abaqus import *
# from abaqusConstants import *
from abaqus import *
from abaqusConstants import *
def Step(**kwargs):
"""
Create buckling analysis and define all the parameters
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
# Define a standard buckling step with Subspace solver
......
""" Module contains helper functions to build microtubules, centrosomes
and interMT connectors"""
# from abaqus import *
# from abaqusConstants import *
from abaqus import *
from abaqusConstants import *
import __main__
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import sketch
import displayGroupOdbToolset as dgo
def create_MT_part( l, type, i, **kwargs ):
"""
Create an Abaqus object representing a single microtubule part
:param l: Length of the microtuble
:type l: float
:param type: Type of the MT: aMT or ipMT
:type type: str
:param i: sequential number of the MT
:type i: str
:param kwargs: model parameters
:type kwargs: dict
:return: part object, MTname
:rtype: object, str
"""
modelname = kwargs['modelname']
......@@ -45,13 +62,21 @@ def create_MT_part( l, type, i, **kwargs ):
def create_connector_part( connectorname, length, **kwargs ):
"""
Create an Abaqus object that represents a single connector part
:param connectorname: Name of the connector
:type connectorname: str
:param length: Length of the connector
:type length: float
:param kwargs: model parameters
:type kwargs: dict
:return: Part object
:rtype: object
"""
modelname = kwargs['modelname']
......@@ -77,14 +102,22 @@ def create_connector_part( connectorname, length, **kwargs ):
def create_centrosome_sketch( l, r, **kwargs ):
"""
Create a 2D sketch of the centrosome middle cross-section
:param l: Length of the centrosome, e.g., dimension along z axis
:type l: float
:param r: Radius of the centrosome, e.g., radius of the centrosome cross-section
in x-y plane
:type r: float
:param kwargs: model parameters
:type kwargs: dict
:return: Sketch object
:rtype: object
"""
modelname = kwargs['modelname']
......@@ -106,13 +139,21 @@ def create_centrosome_sketch( l, r, **kwargs ):
def create_mt_name( l, type, i ):
"""
Specify a unique name to each created microtubule
:param l: Length of the MT
:type l: float
:param type: Type of the MT: aMT or ipMT
:type type: str
:param i: sequential number of the MT
:type i: int
:return: MTname
:rtype: str
"""
if type == 'ipMT':
......@@ -129,15 +170,25 @@ def create_mt_name( l, type, i ):
def create_section( sectionName, sectionProfile, sectionMaterial, **kwargs ):
"""
Create a beam section for the microtubule
:param sectionName: Name of the section. 'MT-section'
:type sectionName: str
:param sectionProfile: Type of the section profile. 'MT-profile'
:type sectionProfile: str
:param sectionMaterial: Name of the material assigned to the section. 'MT_material'
:type sectionMaterial: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -155,15 +206,25 @@ def define_material( name, E, nu, **kwargs ):
"""
Define material parameters of microtubules, connectors and centrosomes specifying
its module of elasticity and Poisson's ratio
:param name: Name of the material
:type name: str
:param E: Module of elasticity
:type E: float
:param nu: Poisson's ratio
:type nu: float
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -174,13 +235,21 @@ def define_material( name, E, nu, **kwargs ):
def assign_MT_section( part, MTname, **kwargs ):
"""
Assign a section to microtubules
:param part: Microtubule part to which section to be assigned
:type part: object
:param MTname: Name of the microtubule
:type MTname: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -197,11 +266,17 @@ def assign_MT_section( part, MTname, **kwargs ):
def assign_MT_section_orientation( MTname, **kwargs ):
"""
Assign MT section orientation with respect to the local coordinates of the MT
:param MTname: Name of the microtubule
:type MTname: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -219,13 +294,21 @@ def assign_MT_section_orientation( MTname, **kwargs ):
def assign_connector_section( part, name, **kwargs ):
"""
Assign a section to each connector
:param part: Connector part to which section to be assigned
:type part: object
:param name: Name of the connector
:type name: str
:param kwargs: model parameters
:type kwargs: dict
:return: Region containing connector
:rtype: object
"""
e = part.edges
......@@ -241,13 +324,21 @@ def assign_connector_section( part, name, **kwargs ):
def create_centrosome_part( Centrosomesketch, name, **kwargs ):
"""
Create an Abaqus object containing centrosome geometry part
:param Centrosomesketch: Name of the centrosome sketch object
:type Centrosomesketch: str
:param name: Name of the centrosome part
:type name: object
:param kwargs: model parameters
:type kwargs: str
:return: Centrosome part
:rtype: object
"""
modelname = kwargs['modelname']
......@@ -266,15 +357,25 @@ def create_centrosome_part( Centrosomesketch, name, **kwargs ):
def assign_centrosome_section( part, name, sectionName, **kwargs ):
"""
Assign section to the Centrosome part
:param part: Centrosome part to which the section is to be assigned
:type part: object
:param name: Name of the centrosome
:type name: str
:param sectionName: Name of the section to be assigned
:type sectionName: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......@@ -292,9 +393,13 @@ def assign_centrosome_section( part, name, sectionName, **kwargs ):
def model( **kwargs ):
"""
Create Abaqus model for the mitotic spindle
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
modelname = kwargs['modelname']
......
# from abaqus import *
# from abaqusConstants import *
from abaqus import *
from abaqusConstants import *
import __main__
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import sketch
import displayGroupOdbToolset as dgo
from Parts import GeometryBuilder as gb
def centrosome( **kwargs ):
"""
Creates a centrosome part object, assigns material and section
:param kwargs: model parameters
:type kwargs: dict
:return: centrosome part
:rtype: object
"""
# Create Centrosome sketch
l = kwargs['CentrosomeLength']
r = kwargs['CentrosomeRadius']
s = gb.create_centrosome_sketch(l, r, **kwargs)
# Create Centrosome part
......@@ -42,15 +55,25 @@ def centrosome( **kwargs ):
def microtubule( type, l, i, **kwargs ):
"""
Creates a microtubule part object and assigns material and section
:param type: Either aMT or ipMT
:type type: str
:param l: Length of the microtubule
:type l: float
:param i: Sequential index of the microtubule
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
# Create part
......@@ -89,15 +112,25 @@ def microtubule( type, l, i, **kwargs ):
def connector( i, length, connectorname, **kwargs ):
"""
Creates a connector part object and assigns material and section
:param i: Sequential number of the connector
:type i: int
:param length: Length of the connector
:type length: float
:param connectorname: Name of the connector
:type connectorname: str
:param kwargs: model parameters
:type kwargs: dict
:return: Null
:rtype: Null
"""
# Create part
......
......@@ -8,7 +8,9 @@ import math
def return_assembly(**kwargs):
"""
Return the current assembly
:param kwargs: object
:return: a -> (object) current assembly
"""
modelname = kwargs['modelname']
......@@ -19,8 +21,11 @@ def return_assembly(**kwargs):
def add_centrosome(position, **kwargs):
"""
Generate and add centrosome
:param position: 'right' or 'left' -> positioning of centrosome in the spindle
:param kwargs: object
:return: Null
"""
modelname = kwargs['modelname']
......@@ -55,10 +60,15 @@ def add_centrosome(position, **kwargs):
def add_microtubule(l, type, i, **kwargs):
"""
Generate and add microtubules to the assembly
:param l: length of the microtubule
:param type: 'ipMT' or 'aMT' -> Either interpolar or astral microtubule
:param i: number of MT
:param kwargs: object
:return: p -> microtubule part, MTname -> (string) name of the MT
"""
......@@ -75,10 +85,15 @@ def add_microtubule(l, type, i, **kwargs):
def add_connectors(pos1, pos2, MTname1, MTname2, z, **kwargs):
"""
Generate and add connectors to couple ipMT pair
:param pos1: (x, y, z) of the 1-st ipMT of the pair to be connected
:param pos2: (x, y, z) of the 2-nd ipMT of the pair to be connected
:param z: numpy array of connector positions along z coordinate
:param kwargs: dictionary -> keyword arguments
:return: list -> list of connector names, float -> angle of connector orientation
"""
......@@ -102,11 +117,13 @@ def add_connectors(pos1, pos2, MTname1, MTname2, z, **kwargs):
def generate_MT_length( type, **kwargs ):
"""
calculate length of an MT based on its type
:param type: 'ipMT' or 'aMT' -> interpolar or astral microtubules
:param kwargs: object
:return: l -> (float) length of the MT
"""
import random
if type == 'ipMT':
l = kwargs['lengthInterval'][0] * random.random() + kwargs['lengthInterval'][1]
......@@ -121,9 +138,13 @@ def generate_MT_length( type, **kwargs ):
def create_MT_instance(type, i, **kwargs):
"""
create abaqus instance that contain a single microtubule
:param type: 'ipMT' or 'aMT' -> interpolar or astral microtubule
:param i: number of microtubule
:param kwargs: object
:return: l -> (float) length of MT,
p -> (object) MT part,
MTname -> (string) name of MT
......
# from abaqus import *
# from abaqusConstants import *
# import math
from abaqus import *
from abaqusConstants import *
import math
from SpindleAssembly import AddComponents as ah
from SpindleAssembly.AddComponents import return_assembly, create_MT_instance
......@@ -8,9 +8,13 @@ from SpindleAssembly.AddComponents import return_assembly, create_MT_instance
def assign_ipMTs_right(pos, i, **kwargs):
"""
Position interpolar microtubules to start from the right centrosome
:param pos: (x, y) -> coordinates of MT
:param i: number of MT
:param kwargs: object
:return: MTname -> (string) name of ipMT,
zBeginPos -> (float) z coordinate of the starting end of ipMT in global
coordinates
......@@ -45,9 +49,13 @@ def assign_ipMTs_right(pos, i, **kwargs):
def assign_ipMTs_left(pos, i, **kwargs):
"""
Position interpolar microtubules to start from the left centrosome
:param pos: (x, y) -> coordinates of MT
:param i: number of MT
:param kwargs: object
:return: MTname -> (string) name of ipMT,
zBeginPos -> (float) z coordinate of the starting end of ipMT in global
coordinates
......@@ -85,8 +93,11 @@ def assign_ipMTs_left(pos, i, **kwargs):
def generate_aMT_position(type, **kwargs):
"""
Calculate the position of astral microtubules within the spindle
:param type: 'right', 'left' -> either left or right centrosome bound aMTs specified
:param kwargs: object
:return: pos -> (x, y, z) global coordinates of the starting end of aMT
theta -> orientation angle 1 in spherical coordinates
phi -> orientation angle 2 in spherical coordinates
......@@ -120,10 +131,15 @@ def generate_aMT_position(type, **kwargs):
def position_aMT(a, MTname, type, **kwargs):
"""
Position astral microtubule within the spindle
:param a: current assembly
:param MTname: name of aMT
:param type: 'left' or 'right' -> specifies to which pole the aMT is attached
:param kwargs: object
:return: pos -> (x, y, z) global cartesian coordinates of the starting end of aMT
"""
......@@ -149,8 +165,11 @@ def position_aMT(a, MTname, type, **kwargs):
def assign_aMT(type, **kwargs):
"""
Add and position astral microtubules
:param type: 'right' or 'left' -> specify the pole that aMTs should be attached to
:param kwargs: object
:return: aMTnames -> (list) list of aMT names
positions -> (list of tuples) global coordinates of starting end of each aMT
"""
......
# from abaqus import *
# from abaqusConstants import *
import itertools
from abaqus import *
from abaqusConstants import *
from SpindleAssembly import AddComponents as ah
from SpindleAssembly.AddComponents import return_assembly
......@@ -7,10 +8,15 @@ from SpindleAssembly.AddComponents import return_assembly
def generate_connector_positions( pos1, pos2, MTtype, **kwargs ):
"""
Generate random points along the connection region of two ipMTs
:param pos1: (x, y, zBeginPos, zEndPos, l) -> coordinates of the free end of first ipMT
:param pos2: (x, y, zBeginPos, zEndPos, l) -> coordinates of the free end of the second ipMT
:param MTtype: 'parallel' or 'antiparallel' -> defines if the MT pair is parallel or antiparallel
:param kwargs: dictionary -> keyword arguments
:return: numpy array of connector positions along z coordinate
"""
import random
......@@ -43,9 +49,13 @@ def generate_connector_positions( pos1, pos2, MTtype, **kwargs ):
def generate_partition_points(z, MTname, **kwargs):
"""
Partition individual ipMT with points corresponding to connector positions
:param z: numpy array of connector positions along z coordinate
:param MTname: name of the ipMT to be partitioned
:param kwargs: dictionary -> keyword arguments
:return: list -> partition names
"""
modelname = kwargs['modelname']
......@@ -63,12 +73,19 @@ def generate_partition_points(z, MTname, **kwargs):
def position_connectors(pos1, pos2, z, connectornames, alpha, **kwargs):
"""
Position connectors on the associated ipMT by z coordinate
:param pos1: (x, y, zBeginPos, zEndPos, l) -> coordinates of the first mt of the pair
:param pos2: (x, y, zBeginPos, zEndPos, l) -> coordinates of the second mt of the pair
:param z: list connector positions
:param connectornames: list connector names
:param alpha: float orientation of connectors
:param kwargs: dictionary -> keyword arguments
:return: global coordinates of connectors between a pair of ipMTs
"""
a = ah.return_assembly(**kwargs)
......@@ -99,9 +116,13 @@ def position_connectors(pos1, pos2, z, connectornames, alpha, **kwargs):
def pick_vertices(mtname, data, **kwargs):
"""
Pick the connecting ends of all connectors associated with the current ipMT
:param mtname: string name of the ipMT
:param data: list containing all ipMTs and connectors of the model
:param kwargs: dictionary -> keyword arguments
:return: list -> connecting vertices that belong to connectors associated with the current ipMT
"""
a = return_assembly(**kwargs)
......@@ -126,8 +147,11 @@ def pick_vertices(mtname, data, **kwargs):
def attach_connectors(data, **kwargs):
"""
Create attachment wire between two vertexes and define the properties of connection
:param data: list containing all ipMTs and connectors of the model
:param kwargs: dictionary -> keyword arguments
:return: Null
"""
a = return_assembly(**kwargs)
......
from SpindleAssembly import AddComponents as ah
from SpindleAssembly import PositionComponents
import numpy as np
# import math
import math
def generate_separation():
"""
Calculate distance and angle between interpolar mts based on the given random distribution
:return: s -> (float) distance between ipMTs
alpha -> (float) angle between ipMTs in degrees
"""
......@@ -20,8 +22,11 @@ def check_MT_within_centrosome(pos, **kwargs):
"""
Add ipMT if its x and y coordinates do not exceed the radius of the
circular cross-section of a centrosome
:param pos: (x, y) -> local coordinates of ipMT
:param kwargs: object
:return: True or False
"""
centrosomeRadius = kwargs['CentrosomeRadius']
......@@ -36,15 +41,25 @@ def check_MT_within_centrosome(pos, **kwargs):
def condition_for_fourth_ipMT( alpha2, alpha3, s, pos3 ):
"""
Condition of positioning the fourth ipMT
:param alpha2: Angle between ipMTs number 2 and 3
:type alpha2: float
:param alpha3: Angle between ipMTs number 3 and 4
:type alpha3: float
:param s: Separation between ipMTs
:type s: float
:param pos3: (x, y) Position of the third ipMT
:type pos3: tuple
:return: y coordinate of the ipMT, mewalpha angle of the ipMT
:rtype: float, float
"""
if math.radians(alpha3) >= math.pi - math.radians(alpha2):
......@@ -59,11 +74,17 @@ def condition_for_fourth_ipMT( alpha2, alpha3, s, pos3 ):
def add_first_ipMT( i, **kwargs ):
"""
Add and position the first ipMT within the spindle
:param i: Sequential number of ipMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: MTname, pos, alpha, kwargs
:rtype: str, tuple, float, dict
"""
x = -0.018
......@@ -83,15 +104,25 @@ def add_first_ipMT( i, **kwargs ):
def add_second_ipMT( pos, alpha1, i, **kwargs ):
"""
Add and position the second ipMT within the spindle
:param pos: (x, y) position of the previously added ipMT
:type pos: tuple
:param alpha1: Angle of the previously added ipMT
:type alpha1: float
:param i: Sequential number of ipMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: MTname, pos, alpha, kwargs
:rtype: str, tuple, float, dict
"""
# Generate position of the ipMT
......@@ -127,15 +158,25 @@ def add_second_ipMT( pos, alpha1, i, **kwargs ):
def add_third_ipMT( pos2, alpha2, i, **kwargs ):
"""
Add and position the third ipMT within the spindle
:param pos2: (x, y) position of the previously added ipMT
:type pos2: tuple
:param alpha2: Angle of the previously added ipMT
:type alpha2: float
:param i: Sequential number of ipMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: MTname, pos, alpha, kwargs
:rtype: str, tuple, float, dict
"""
# Generate position of the ipMT
......@@ -168,17 +209,29 @@ def add_third_ipMT( pos2, alpha2, i, **kwargs ):
def add_fourth_ipMT( pos3, alpha2, alpha3, i, **kwargs ):
"""
Add and position the fourth ipMT within the spindle
:param pos3: (x, y) position of the previously added ipMT
:type pos3: tuple
:param alpha2: Angle of ipMT 2
:type alpha2: float
:param alpha3: Angle of ipMT 3
:type alpha3: float
:param i: Sequential number of ipMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: MTname, pos, alpha, kwargs
:rtype: str, tuple, float, dict
"""
# Generate position of the ipMT
......@@ -211,15 +264,25 @@ def add_fourth_ipMT( pos3, alpha2, alpha3, i, **kwargs ):
def add_fifth_ipMT( pos4, alpha4, i, **kwargs ):
"""
Add and position the fifth ipMT within the spindle
:param pos4: (x, y) position of the previously added ipMT
:type pos4: tuple
:param alpha4: Angle of the previously added ipMT
:type alpha4: float
:param i: Sequential number of ipMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: MTname, pos, alpha, kwargs
:rtype: str, tuple, float, dict
"""
# Generate position of the ipMT
......@@ -254,17 +317,29 @@ def add_fifth_ipMT( pos4, alpha4, i, **kwargs ):
def add_sixth_ipMT( pos5, alpha4, alpha5, i, **kwargs ):
"""
Add and position sixth ipMT within the spindle
:param pos5: (x, y) position of the previously added ipMT
:type pos5: tuple
:param alpha4: Angle of the ipMT 4
:type alpha4: float
:param alpha5: Angle of the ipMT 5
:type alpha5: float
:param i: Sequential number of ipMT
:type i: int
:param kwargs: model parameters
:type kwargs: dict
:return: MTname, pos, alpha, kwargs
:rtype: str, tuple, float, dict
"""
# Generate position of the ipMT
......
# from abaqus import *
# from abaqusConstants import *
# import sys
from abaqus import *
from abaqusConstants import *
import sys
from numpy import ones
from SpindleAssembly.PositionComponents import assign_aMT
from SpindleAssembly.PositionConnectors import attach_connectors
# sys.path.append("J:\ECS Research\Public\VLC\Spindle")
sys.path.append("J:\ECS Research\Public\VLC\Spindle")
from SpindleAssembly import AddComponents as ac
from SpindleAssembly import PositionIpMTs
from Parts import GeometryBuilder as gb
......@@ -14,8 +14,11 @@ from SpindleAssembly import PositionConnectors
def generate_assembly(**kwargs):
"""
Call modules to generate assembly
:type kwargs: object
:param kwargs:
:return: kwargs -> object
"""
create_model_assembly(**kwargs)
......@@ -28,7 +31,9 @@ def generate_assembly(**kwargs):
def create_model_assembly(**kwargs):
"""
Create Abaqus model and assembly
:param kwargs: object
:return: None
"""
gb.model(**kwargs)
......@@ -40,7 +45,9 @@ def create_model_assembly(**kwargs):
def add_and_position_centrosomes(**kwargs):
"""
Create centrosomes and position them at the right or left pole
:param kwargs: model marameters. object
:return: None
"""
# Add right centrosome
......@@ -52,7 +59,9 @@ def add_and_position_centrosomes(**kwargs):
def add_and_position_interpolar_mts_and_connectors(**kwargs):
"""
Create and position interpolar microtubules and connects them with connectors
:param kwargs: model parameters. object
:return: MTdata -> (dictionary) Contains ipMT names, positions and connector positions
"""
MTdata, ConnectorData, data = assign_ipMTs(**kwargs)
......@@ -64,7 +73,9 @@ def add_and_position_interpolar_mts_and_connectors(**kwargs):
def add_and_position_astral_mts(**kwargs):
"""
Create and position astral microtubules
:param kwargs: object
:return: aMTnames -> (list) list of astral microtubule names
kwargs -> object
"""
......@@ -77,9 +88,13 @@ def add_and_position_astral_mts(**kwargs):
def assign_ipMTs(**kwargs):
"""
Position the microtubules within the spindle along with the associated connectors
:param kwargs: model parameters
:type kwargs: dict
:return: MTdata, ConnectorData, data
:rtype: list, list, list
"""
# Create dictionary to store MT metadata
......
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment