Copy of all structures in the TransformedStructure. A
        structure is stored after every single transformation.
341870
def structures(self):
        
        hstructs = [Structure.from_dict(s['input_structure'])
                    for s in self.history if 'input_structure' in s]
        return hstructs + [self.final_structure]
612568
def reorient_z(structure):
    
    struct = structure.copy()
    sop = get_rot(struct)
    struct.apply_operation(sop)
    return struct
1185379
function cloneListForMapAndSample(original, excludeDimensions) {
    var allDimensions = original.dimensions;
    var list = new List(
        zrUtil.map(allDimensions, original.getDimensionInfo, original),
        original.hostModel
    );
    // FIXME If needs stackedOn, value may already been stacked
    transferProperties(list, original);

    var storage = list._storage = {};
    var originalStorage = original._storage;

    // Init storage
    for (var i = 0; i < allDimensions.length; i++) {
        var dim = allDimensions[i];
        if (originalStorage[dim]) {
            // Notice that we do not reset invertedIndicesMap here, becuase
            // there is no scenario of mapping or sampling ordinal dimension.
            if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
                storage[dim] = cloneDimStore(originalStorage[dim]);
                list._rawExtent[dim] = getInitialExtent();
                list._extent[dim] = null;
            }
            else {
                // Direct reference for other dimensions
                storage[dim] = originalStorage[dim];
            }
        }
    }
    return list;
}
121777
def copy(self):
        

        ld = LiveDefinitions()
        ld._memory_map = self._memory_map.copy()
        ld._register_map = self._register_map.copy()
        ld._defs = self._defs.copy()

        return ld
1133654
def copy_all(self, source_databox):
        
        self.copy_headers(source_databox)
        self.copy_columns(source_databox)
        return self
385019
def _process_structures(structures):
        
        input_structures = structures
        structures = [input_structures[0]]
        for s in input_structures[1:]:
            prev = structures[-1]
            for i in range(len(s)):
                t = np.round(prev[i].frac_coords - s[i].frac_coords)
                if np.any(np.abs(t) > 0.5):
                    s.translate_sites([i], t, to_unit_cell=False)
            structures.append(s)
        return structures
1161077
public static Structure getReducedStructure(Structure orig){
		Structure s = new StructureImpl();
		s.setPDBHeader(orig.getPDBHeader());
		for ( Chain c : orig.getChains()){

			Chain c1 = new ChainImpl();
			c1.setId(c.getId());
			c1.setName(c.getName());
			c1.setEntityInfo(c.getEntityInfo());
			s.addChain(c1);

			for (Group g : c.getAtomGroups()){

				Atom a = null;
				switch(g.getType()) {
				case AMINOACID:
					a = g.getAtom(StructureTools.CA_ATOM_NAME);
					break;
				case NUCLEOTIDE:
					a = g.getAtom(StructureTools.NUCLEOTIDE_REPRESENTATIVE);
					break;
				default:
					//omit group
				}
				if ( a != null){

					Group g1 = (Group)g.clone();
					g1.clearAtoms();
					g1.addAtom(a);
					c1.addGroup(g1);

				}

			}

		}
		return s;
	}
110223
def copy(self):
        
        orig = self.all_up
        result = copy(orig)  # copy top level

        while orig is not None:
            result.additional = copy(orig.additional)

            if orig.down is not None:  # copy and create references to the following level
                # copy following level
                result.down = copy(orig.down)

                if orig.t1_child_rel is not None:
                    result.t1_child_rel = ChildRelationship.create(
                        klass=orig.t1_child_rel.__class__,
                        parent=result.t1,
                        child=result.down.t1,
                        param=orig.t1_child_rel.param)
                if orig.t2_child_rel is not None:
                    result.t2_child_rel = ChildRelationship.create(
                        klass=orig.t2_child_rel.__class__,
                        parent=result.t2,
                        child=result.down.t2,
                        param=orig.t2_child_rel.param)

            # descend to next level
            orig = orig.down
            if result.down is not None:
                result = result.down
        return result
223341
private void orderTransformationsByChainId(Structure asymUnit, List<BiologicalAssemblyTransformation> transformations) {
		final List<String> chainIds = getChainIds(asymUnit);
		Collections.sort(transformations, new Comparator<BiologicalAssemblyTransformation>() {
			@Override
			public int compare(BiologicalAssemblyTransformation t1, BiologicalAssemblyTransformation t2) {
				// set sort order only if the two ids are identical
				if (t1.getId().equals(t2.getId())) {
					 return chainIds.indexOf(t1.getChainId()) - chainIds.indexOf(t2.getChainId());
				} else {
					return t1.getId().compareTo(t2.getId());
				}
		    }
		});
	}
1077130
def copy(self):
        

        metadata = {}
        # grab all the keys into a list so if something is added
        # in another thread it probably doesn't stomp on our loop
        for key in list(self.metadata.keys()):
            try:
                metadata[key] = copy.deepcopy(self.metadata[key])
            except RuntimeError:
                # multiple threads
                log.warning('key {} changed during copy'.format(key))

        # copy the core data
        copied = type(self)(entities=copy.deepcopy(self.entities),
                            vertices=copy.deepcopy(self.vertices),
                            metadata=metadata)

        cache = {}
        # try to copy the cache over to the new object
        try:
            # save dict keys before doing slow iteration
            keys = list(self._cache.cache.keys())
            # run through each key and copy into new cache
            for k in keys:
                cache[k] = copy.deepcopy(self._cache.cache[k])
        except RuntimeError:
            # if we have multiple threads this may error and is NBD
            log.debug('unable to copy cache')
        except BaseException:
            # catch and log errors we weren't expecting
            log.error('unable to copy cache', exc_info=True)
        copied._cache.cache = cache
        copied._cache.id_set()

        return copied
313605
def structure_changes_from(current_structure = nil)
      new_structure = column
     
      if current_structure
        # General RDBMS data loss scenarios
        if new_structure[:limit] && current_structure[:limit].to_i != new_structure[:limit].to_i ||
           new_structure[:type] != current_structure[:type] ||
           !new_structure[:default].nil? && column_default_changed?(current_structure[:default], new_structure[:default])

           column
        else
          nil # No changes
        end
      else
        column
      end
    end
394733
def copy(self):
        
        return RigidTransform(np.copy(self.rotation), np.copy(self.translation), self.from_frame, self.to_frame)
294029
public static void put(Map<String,Object> structure, String name, Object object)
    {
        if (name != null && object != null)
        {
            structure.put(name, object);
        }
    }
1370326
def get_structure_with_nodes(self):
        
        new_s = Structure.from_sites(self.structure)
        for v in self.vnodes:
            new_s.append("X", v.frac_coords)
        return new_s
577136
private function generateStructures(): void
    {
        $this->printer->writeln('Generating structures.');
        $this->generator->setChildNamespace('Structure');

        /** @var Struct $structure */
        foreach ($this->wsdl->getStructures() as $name => $structure) {
            $this->printer->writeln(" |\-Generating structure $name");
            $this->generate($structure);
        }
    }
1152652
def _copy(self):
        """"""

        items = self.items()
        subs = {}
        for f in (self.getall("CHAP") + self.getall("CTOC")):
            subs[f.HashKey] = f.sub_frames._copy()
        return (items, subs)
1246027
function () {
        var localTransform = this.localTransform.array;
        var worldTransform = this.worldTransform.array;
        if (this._parent) {
            mat4.multiplyAffine(
                worldTransform,
                this._parent.worldTransform.array,
                localTransform
            );
        }
        else {
            mat4.copy(worldTransform, localTransform);
        }
    }