Model.build_sequence() — build model from a sequence of one-letter codes

build_sequence(sequence, special_patches=None, patch_default=True, blank_single_chain=False)
This builds a new model (overwriting any existing one) of the given sequence, specified as one-letter codes. The sequence can also contain '/' characters to build multi-chain models. The coordinates of the model are automatically constructed using

special_patches, blank_single_chain, and patch_default can be used to adjust the topology; see Model.generate_topology() for more details.

See also Alignment.append_sequence().
Example: examples/commands/

# This demonstrates the use of Alignment.append_sequence() and
# Model.build_sequence() to build residue sequences from one-letter codes

from modeller import *
env = Environ()

# Read parameters (needed to build models from internal coordinates)'${LIB}/top_heav.lib')'${LIB}/par.lib')

# Create a new empty alignment and model:
aln = Alignment(env)
mdl = Model(env)

# Build a model from one-letter codes, and write to a PDB file:

# Build an alignment from one-letter codes
# Set alignment information, and write to file:
aln[0].code = 'seq1'
aln[1].code = 'seq2'