New iDynoMiCS plasmid model The plasmid model in iDynoMiCS is a very simple one, containing only the relevant methods to ensure the continuation and transmission of plasmids to other agents. iDynoMiCS’ EpiBac class makes it possible for the agent to host plasmids and other EPS. This class prepared for an agent of this class to hold more than one plasmid, by instantiating the Episome lass and storing these instances in a list. However, the Episome class, or the plasmid class, functions as an indivisible individual, which defeats the modular nature of a plasmid; therefore, to ensure modularity and ease of implementation, the plasmid was divided in two parts concerning functionality: the first part, known as the backbone (encapsulated in OriginOfTransfer class), relates to the defining of the transfer machinery; this part will contain the necessary items required for conjugation. The second is where all the genes are encoded into the plasmid. The Episome class manages both. The backbone module is where all the necessary information for the plasmid main operation is contained: the Origin of Transfer (oriT), T4SS and MOB genes. This section will only incorporate the required elements for conjugation, protein-producing and reporter genes are stored elsewhere. This structure allows the simulation of distinct plasmid types; if in this section the plasmid lacks any of the substances required by the protocol file, and it can’t find them expressed or within the bacterium, the plasmid becomes non-mobilizable and can only be transferred via segregation. On the contrary, if the bacterium has all listed substances in enough concentration, also specified in the protocol file, the plasmid is considered a mobilizable-conjugative plasmid, whether or not the plasmid’s own genes are the ones expressing the substances. All the MOB required substances will be treated as proteins, with the exception of oriT and T4SS. For otiT, only its existence in the plasmid will be checked, since is one of the first conditions to be examined while in conjugation. T4SS have to be encoded and expressed in a gene, but will not be conditioned to a certain concentration threshold. Also, a plasmid can have one or more oriT, T4SS, and Mob machinery configured. The genes that form the plasmid body can be of two types: protein-producer or a reporter. Additional gene types may be introduced seamlessly. As instance of Gene class, the genes have a promoter zone that designates a logical condition to be met; this in turn expresses or inhibits the production of protein or fluorescence. The proteins accumulate its concentration within the host up until the maximum permitted amount dictated by the protocol file. These substances also have a limited lifespan, after a certain time a protein will start degrading and will cease its existence inside the host cell if the gene responsible for its production is inhibited. The concentration management of the proteins is done by the ProteinContainer and Gene classes. Also, the backbone module may require the presence of certain proteins, and thus, be treated the same as the inhibition-activation function and resolved by a special class called Parser. All the substances that are expressed through the genes are stored in the host. This means that the EpiBac class will now have the task of maintaining the concentrations of substances in its interior. For this, a special container class was designed, in which all the individual proteins are managed called ProteinController which is very similar to iDynoMiCS own AgentContainer class. The Parser class verifies the conditional of both the genes expression and the backbone requirements, measuring the presence and concentration of all required proteins or genes present inside the plasmid of cell. Plasmid compatibility only allows certain plasmids to coexist with one another, that is, plasmids bearing a particular CompatibilityMarker may be permitted inside a recipient cell as long as the plasmid already there has a different marker. To enhance this type compatibility of plasmids, a series of improvements were built. This allows, by protocol file configuration, for a plasmid marked with a certain CompatibilityMarker to be compatible with only certain other markers while discriminating the others. This function can be either configured or not and does not conflict with any other function in the simulator. To fine tune the overall conjugation process, several small adjustments were made to EpiBac class. Such as the inclusion of a maturity time lag, that calculates the probability of a conjugation depending on the current age of the host. And also a routine that adjust the growth rate of the transconjugant cell to take into account the metabolic burden a plasmid makes on its host. Both of these features are configured in the protocol file and, if not present, make no effect in the flow of simulation. UML diagram of the new plasmid model UML DIAGRAM OF THE IDYNOMICS PLASMID EXTENSION. This is the final UML class diagram of the new model; all the new classes were added in a package called extension inside simulator.agent package. The classes shown in the diagram are explained below: EpiBac – Host class, this class will be the one managing plasmids, proteins and conjugation. Episome – Class hosting the plasmid, manages genes encoded in it. EpisomeParam – This class extracts the needed information from the protocol file and sets the required variables. OriginOfTransfer – This class stores the backbone part of the plasmid-model, is where the conditions for conjugation are stored Gene – represents a gene encoded into the plasmid ProteinContainer – manages the proteins that exists within the hosts Protein – represents a type of protein in the bacterium, its concentration varies with time. Parser – this class parses the promoter and backbone conditions with the existences of protein Promoter – in this stored the condition that regulates the gene’s expression