System: Top level object representing the whole molecular system
Creating the system-object is the first step for all topology-related operations. There are two possibilities for it: Make an empty stub system, and then populate it with underlying structures; or create it using existing MagiC core input file magic.inp
and corresponding molecular topology files *.mcm
.
The user can also explicitly provide list of molecular type names (mcmfile) and number of molecules of each type (NMolMType) and box size (Box), see examples below.
- Properties:
-
- MolTypes
- - Molecular types of the system
- Molecules
- - Molecules belonging to the system
- BondTypes
- - Bond types (both pairwise and angle-bending) belonging to the system
- PairBondTypes
- - Pairwise bond types belonging to the system
- AngleBondTypes
- - Angle-bending bond types belonging to the system
- Bonds
- - Bonds (both pairwise and angle-bending) belonging to the system
- PairBonds
- - Pairwise bonds belonging to the system
- AngleBonds
- - Angle-bending bonds belonging to the system
- AtomTypes
- - List of atom types defined in the system
- Atoms
- - List of atoms belonging to the system
- Sites
- - List of sites, i.e. atoms belonging to molecular types of the system
-
- Methods:
- Construct and populate the system:
-
- AddMolType
- - Add molecular type to the system
- AddAtomType
- - Add atom type to the system
- ReadGeometry
- - Read system's geometry from XMOL file
- SetExclusions
- - Set exclusion rules for the system
- ImputeSameAsBond
- - Update BondTypes in the system according to the provided set of potentials/RDFs
- Write to files:
-
- WriteLAMMPSData
- - Write the system's topology to LAMMPS data file
- WriteGromacsTopology
- - Write the system's topology to GROMACS-topology file topfile.top
- WriteGALAMOSTxml
- - Write the system's topology to GALAMOST XML format and
write records for the tabulated potentials as GALAMOST python script
- WriteGALAMOSTExclusions
- - Create a set of two exclusion files for GALAMOST
- WriteMCMs
- - Save all molecular types of the system to corresponding MCM-files
- WriteGeometryGRO
- - Write system's geometry as .gro file
- WriteAsRDFinp
- - Print the system as lines for RDF.inp file. Useful when writing script generating RDF.inp file
- Search and resolve names to objects:
-
- GetBondType
- - Find bond type by MolTypeName:BondNumber
- GetAtomType
- - Find atom type by it's name
- GetMolType
- - Find molecular type by it's name
- IsSystemMatchRDFs
- - Check if current geometry of the system matches the given set of RDFs
Examples:
[fontsize=\small]
system0 = System() # empty system
system1 = System(input='magic.inp') # same system as specified in MagiC.Core input file
system2 = System(mcmfile=['MT1.CG', 'MT2.CG'], NMolMType=[10, 10], Box=[10., 10., 10.])
system3 = System(input='magic.inp', dfset='potentials.pot', geometry='start.xmol')