mbuild_polybuild.aa_monomers.ethylene.Ethylene.save

Ethylene.save(filename, include_ports=False, box=None, overwrite=False, residues=None, **kwargs)

Save the Compound to a file.

Parameters:
  • filename (str) – Filesystem path in which to save the trajectory. The extension or prefix will be parsed and control the format. Supported extensions: ‘gsd’, ‘gro’, ‘top’, ‘mcf’, ‘pdb’, ‘xyz’, ‘json’, ‘mol2’, ‘sdf’, ‘psf’. See mbuild.conversion.save() for more information about writer methods.

  • include_ports (bool, optional, default=False) – Save ports contained within the compound.

  • box (mb.Box, optional, default=self.boundingbox (with buffer)) – Box information to be written to the output file. If ‘None’, a bounding box is used with 0.25nm buffers at each face to avoid overlapping atoms.

  • overwrite (bool, optional, default=False) – Overwrite if the filename already exists

  • residues (str of list of str) – Labels of residues in the Compound. Residues are assigned by checking against Compound.name.

  • **kwargs – See mbuild.conversion.save(). Depending on the file extension these will be passed to either Parmed or GMSO backend writers See https://parmed.github.io/ParmEd/html/structobj/parmed.structure. Structure.html#parmed.structure.Structure.save and https://github.com/mosdef-hub/gmso/tree/main/gmso/formats

Other Parameters:
  • ref_distance (float, optional, default=1.0) – Normalization factor used when saving to the .gsd format for converting distance values to reduced units.

  • ref_energy (float, optional, default=1.0) – Normalization factor used when saving to the .gsd format for converting energy values to reduced units.

  • ref_mass (float, optional, default=1.0) – Normalization factor used when saving to the .gsd format for converting mass values to reduced units.

Notes

When saving the compound as a json, only the following arguments are used: * filename * include_ports

The savers used for each supported file type are: GMSO: .gro, .gsd, .data, .xyz, .mcf, .top Parmed: .mol2, .pdb, .prmtop, .cif, .crd PyBel: .sdf

See also

mbuild.conversion.save

Main saver logic

mbuild.formats.cassandramcf.write_mcf

Write to Cassandra MCF format

mbuild.formats.json_formats.compound_to_json

Write to a json file