def add_cell_vector(self, vector):
act = self.active_inactive[<NUM_LIT:0>]<EOL>if len(act) == <NUM_LIT:3>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>matrix = np.zeros((<NUM_LIT:3>, <NUM_LIT:3>), float)<EOL>active = np.zeros(<NUM_LIT:3>, bool)<EOL>if len(act) == <NUM_LIT:0>:<EOL><INDENT>matrix[:, <NUM_LIT:0>] = vector<EOL>active[<NUM_LIT:0>] = True<EOL>return UnitCell(matrix, active)<EOL><DEDENT>a = self.matrix[:, act[<NUM_LIT:0>]]<EOL>matrix[:, <NUM_LIT:0>] = a<EOL>active[<NUM_LIT:0>] = True<EOL>if len(act) == <NUM_LIT:1>:<EOL><INDENT>matrix[:, <NUM_LIT:1>] = vector<EOL>active[<NUM_LIT:1>] = True<EOL>return UnitCell(matrix, active)<EOL><DEDENT>b = self.matrix[:, act[<NUM_LIT:1>]]<EOL>matrix[:, <NUM_LIT:1>] = b<EOL>active[<NUM_LIT:1>] = True<EOL>if len(act) == <NUM_LIT:2>:<EOL><INDENT>matrix[:, <NUM_LIT:2>] = vector<EOL>active[<NUM_LIT:2>] = True<EOL>return UnitCell(matrix, active)<EOL><DEDENT>
Returns a new unit cell with an additional cell vector