Пример #1
0
def _validate_compatibility(top):
    """Check compatability of topology object with GROMACS TOP format"""
    accepted_potentials = [
        LennardJonesPotential(),
        HarmonicBondPotential(),
        HarmonicAnglePotential()
    ]
    check_compatibility(top, accepted_potentials)
Пример #2
0
def _validate_compatibility(top):
    """Check compatability of topology object with GROMACS TOP format"""
    templates = PotentialTemplateLibrary()
    lennard_jones_potential = templates['LennardJonesPotential']
    harmonic_bond_potential = templates['HarmonicBondPotential']
    harmonic_angle_potential = templates['HarmonicAnglePotential']
    accepted_potentials = [lennard_jones_potential, harmonic_bond_potential, harmonic_angle_potential]
    check_compatibility(top, accepted_potentials)
Пример #3
0
def _check_compatibility(top):
    """Check Topology object for compatibility with Cassandra MCF format"""

    if not isinstance(top, Topology):
        raise GMSOError("MCF writer requires a Topology object.")
    if not all([site.atom_type.name for site in top.sites]):
        raise GMSOError(
            "MCF writing not supported without parameterized forcefield.")
    accepted_potentials = [
        potential_templates['LennardJonesPotential'],
        potential_templates['MiePotential'],
        potential_templates['HarmonicAnglePotential'],
        potential_templates['PeriodicTorsionPotential'],
        potential_templates['OPLSTorsionPotential'],
        potential_templates['RyckaertBellemansTorsionPotential'],
    ]
    check_compatibility(top, accepted_potentials)
Пример #4
0
def _validate_compatibility(top):
    """Check compatability of topology object with GROMACS TOP format."""
    pot_types = check_compatibility(top, _accepted_potentials())
    return pot_types