All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.biojava.nbio.structure.io.cif.CifChainSupplierImpl Maven / Gradle / Ivy

There is a newer version: 7.1.3
Show newest version
package org.biojava.nbio.structure.io.cif;

import org.biojava.nbio.structure.Chain;
import org.rcsb.cif.model.CifFile;

import java.util.ArrayList;
import java.util.List;

/**
 * Convert a chain to a {@link CifFile}.
 * @author Sebastian Bittrich
 */
public class CifChainSupplierImpl extends AbstractCifFileSupplier {
    @Override
    public CifFile get(Chain container) {
        return getInternal(container.getStructure(), collectWrappedAtoms(container));
    }

    private List collectWrappedAtoms(Chain chain) {
        List wrappedAtoms = new ArrayList<>();
        handleChain(chain, 1, wrappedAtoms);
        return wrappedAtoms;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy